MSChart Control

A chart that graphically displays data.

Syntax

MSChart

Remarks

The MSChart control supports the following features:

  • True three-dimensional representation.

  • Support for all major chart types.

  • Data grid population via random data and data arrays.

The MSChart control is associated with a data grid (DataGrid object). This data grid is a table that holds the data being charted. The data grid can also include labels used to identify series and categories on the chart. The person who designs your chart application fills the data grid with information by inserting data or by importing data from a spreadsheet or array.


Topic Not Found

No matching topic was found. Some possible reasons and remedies are as follows:

  • The file (.chm) that contains the destination topic is not in the expected location.

    Remedy: Rerun the MSDN Library Setup.

  • The file (.chm) that contains the current topic or destination topic is out-of-date and the link is no longer valid.

    Remedy: Install the latest version of the MSDN Library.

  • The MSDN Library CD is not in the CD-ROM drive.

    Remedy: Insert the MSDN Library CD into the CD-ROM drive.


DataPoints Collection

A group of chart data points.

Syntax

object.DataPoints.(index)

The DataPoints collection syntax has these parts:

Part | Description
object | An object expression that evaluates to an object the Applies To list.
index | Identifies a specific data point within the current series. For this version of the chart, –1 is the only valid value for this argument. This allows you two make changes to the default settings for all data points in the series. Settings cannot be changed for individual data points within the series.


DataPoints Collection Example

The following example sets the markers for a data point in a chart.

Private Sub Command1_Click()
   With MSChart1.Plot.SeriesCollection(1).DataPoints(-1)
   ' Set DataPoint marker visible.
      .Marker.Visible = True
      .Marker.Style = VtMarkerStyleDiamond
   End With
End Sub

The Datapoints collection Item method takes a special –1 argument to designate default properties for all data points of the series. The Datapoint object returned by Item(–1) can be manipulated just like a normal Datapoint object. A property set on this default data point affects every data point in the series, except those data points that have had that property set individually. In the example, the data point label for each series is set at three different locations. It makes no difference whether individual data point settings come before or after default settings; the individual settings always override the default settings. The ResetCustom method can be used to remove any individual settings for a data point and cause it to use the default settings for the series.

Option Explicit
Option Base 1
Private Sub Command1_Click()
   With MSChart1.Plot
      .SeriesCollection(1).DataPoints.Item(-1) _
      .DataPointLabel.LocationType = VtChLabelLocationTypeAbovePoint

      .SeriesCollection(2).DataPoints.Item(-1) _
      .DataPointLabel.LocationType = VtChLabelLocationTypeCenter

      .SeriesCollection(3).DataPoints.Item(-1) _
      .DataPointLabel.LocationType = VtChLabelLocationTypeBase
   End With
End Sub


Labels Collection

A group of chart axis labels.

Syntax

axis.Labels(index)

The Labels collection syntax has these parts:

Part | Description
axis | An Axis object.
index | Identifies a specific axis label (Label object)within the current collection.


LightSource Collection Example

The following example sets the coordinates and intensity for a light source, then adds a light source from a chart. To try the example, draw an MSChart, and two CommandButton controls on a form. Paste the code into the Form object's code module and run the project. Click the buttons to change the light sources.

Option Explicit

Private Sub Form_Load()
   ' Configure the chart and its light source.
   With MSChart1
      .chartType = VtChChartType3dBar
      .Plot.Light.AmbientIntensity = 0.01 ' 1 % Intensity.
      .Plot.Light.EdgeIntensity = 0.5      ' 50 % Intensity.
      .Plot.Light.EdgeVisible = True
   End With
End Sub

Private Sub Command1_Click()
   Dim LightSource As Object
   Set LightSource = _
   MSChart1.Plot.Light.LightSources(1)
   ' Set coordinates for Light Source 1 as well as its
   ' intensity.
   LightSource.X = 1
   LightSource.y = 0.5
   LightSource.Z = 1
   LightSource.Intensity = 1
End Sub

Private Sub Command2_Click()
   ' Add a new light source.
   MSChart1.Plot.Light.LightSources.Add 0.5, 0.1, 1, 1
End Sub


LightSources Collection

A group of LightSource objects in a chart.

Syntax

object.LightSources(index)

The LightSources collection syntax has the following parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
index | Integer. A number that uniquely identifies a member of the collection.


Series Collection

A collection of chart series.

Syntax

Series (index)

The Series collection syntax has these parts:

Part | Description
index | Integer. Identifies the series of the chart. Series are identified in the order of data grid columns, beginning with 1.


SeriesCollection Collection

Provides information about the series that make up a chart.

Syntax

SeriesCollection (index)

The SeriesCollection collection syntax has these parts:

Part | Description
index | Identifies a specific series in the series collection.


Series, SeriesCollection Collections Example

The following example hides all the series in a chart.

Private Sub Command1_Click()
   Dim serX As Series
   ' Hides All Series.
   For Each serX In MSChart1.Plot.SeriesCollection
      serX.Position.Hidden = True
   Next
End Sub


AngleUnits Constants

VtAngleUnits provides the valid units for measuring chart angles.

Constants | Description
VtAngleUnitsDegrees | Chart angles are measured in degrees.
VtAngleUnitsRadians | Chart angles are measured in radians.
VtAngleUnitsGrads | Chart angles are measured in grads.


AxisId Constants

The VtChAxisId constants provide options for identifying a chart axis.

Constants | Description
VtChAxisIdX | Identifies the x axis.
VtChAxisIdY | Identifies the y axis.
VtChAxisIdY2 | Identifies the secondary y axis.
VtChAxisIdZ | Identifies the z axis.


AxisTickStyle Constants

The VtChAxisTickStyle constants provide options for indicating axis tick mark location.

Constants | Description
VtChAxisTickStyleNone | No tick marks are displayed on the axis.
VtChAxisTickStyleCenter | Tick marks are centered across the axis.
VtChAxisTickStyleInside | Tick marks are displayed inside the axis.
VtChAxisTickStyleOutside | Tick marks are displayed outside the axis.


BorderStyle Constants (MSChart)

The VtBorderStyle constants provide options for the type of border to be placed around the chart control.

Constant | Description
VtBorderStyleFixedSingle | A single border is placed around the chart control.
VtBorderStyleNone | No border is placed around the chart control.


BrushHatches Constants

BrushHatch Constants

VtBrushHatch provides valid brush types if VtBrushStyle is set to VtBrushStyleHatch.

Constant | Description
VtBrushHatchHorizontal | Horizontal hatch lines
VtBrushHatchVertical | Vertical hatch lines
VtBrushHatchDownDiagonal | Down diagonal hatch lines
VtBrushHatchUpDiagonal | Up diagonal hatch lines
VtBrushHatchCross | Cross hatch lines
VtBrushHatchDiagonalCross | Diagonal cross hatch lines


BrushPatterns Constants

BrushPattern Constants

VtBrushPattern provides valid brush types if VtBrushStyle is set to VtBrushStylePattern.

Constant | Description
VtBrushPattern94percent | 94 percent pattern color
VtBrushPattern88percent | 88 percent pattern color
VtBrushPattern75percent | 75 percent pattern color
VtBrushPattern50percent | 50 percent pattern color
VtBrushPattern25percent | 25 percent pattern color
VtBrushPatternBoldHorizontal | Bold horizontal lines
VtBrushPatternBoldVertical | Bold vertical lines
VtBrushPatternBoldDownDiagonal | Bold down diagonal lines
VtBrushPatternBoldUpDiagonal | Bold up diagonal lines
VtBrushPatternChecks | Checks pattern
VtBrushPatternWeave | Weave pattern
VtBrushPatternHorizontal | Horizontal lines
VtBrushPatternVertical | Vertical lines
VtBrushPatternDownDiagonal | Down diagonal lines
VtBrushPatternUpDiagonal | Up diagonal lines
VtBrushPatternGrid | Grid pattern
VtBrushPatternTrellis | Trellis pattern
VtBrushPatternInvertedTrellis | Inverted trellis pattern


BrushStyle Constants

VtBrushStyle provides valid brush types.

Constant | Description
VtBrushStyleNull | No brush (background shows through)
VtBrushStyleSolid | Solid color brush
VtBrushStylePattern | Bitmap patterned brush
VtBrushStyleHatched | Hatched brush


ChartType Constants

VtChChartType provides chart type options.

Constant | Description
VtChChartType3dBar | 3D Bar
VtChChartType2dBar | 2D Bar
VtChChartType3dLine | 3D Line
VtChChartType2dLine | 2D Line
VtChChartType3dArea | 3D Area
VtChChartType2dArea | 2D Area
VtChChartType3dStep | 3D Step
VtChChartType2dStep | 2D Step
VtChChartType3dCombination | 3D Combination
VtChChartType2dCombination | 2D Combination
VtChChartType2dPie | 2D Pie
VtChChartType2dXY | 2D XY


DrawMode Constants

The VtChDrawMode constants provide options for redisplaying a chart after it has been altered.

Constants | Description
VtChDrawModeDraw | Draw mode. The chart is redrawn on the screen every time you change a setting.
VtChDrawModeBlit | Blit mode. The chart is redrawn off the screen and displayed after the redraw is complete.

Blit mode stores a bitmap copy of the chart in memory when the chart is laid out. Repainting the chart uses the bitmap and draws very quickly. It requires more memory than Draw mode, but can save time waiting for the chart to redraw on screen. Blit mode is particularly useful when working with charts that contain many elements.


FillStyle Constants

The VtFillStyle constants provide options for indicating the type of fill used to paint a backdrop.

Constant | Description
VtFillStyleNull | No fill (background shows through)
VtFillStyleBrush | A solid color or pattern fill


FontEffect Constants

VtFontEffect provides methods of altering fonts for the desired effect.

Constant | Description
VtFontEffectStrikeThrough | Applies the strike-through attribute to the font.
VtFontEffectUnderline | Applies the underscore attribute to the font.


FontStyle Constants

VtFontStyle provides valid font attribute options.

Constant | Description
VtFontStyleBold | Applies the bold attribute to the font.
VtFontStyleItalic | Applies the italic attribute to the font.
VtFontStyleOutline | Applies the outline attribute to the font.


FrameStyle Constants

The VtFrameStyle constants provide options for displaying backdrop frames.

Constant | Description
VtFrameStyleNull | No frame.
VtFrameStyleSingleLine | A single line encloses the backdrop.
VtFrameStyleDoubleLine | Two equal width lines enclose the backdrop.
VtFrameStyleThickInner | A thick inner line and a thin outer line enclose the backdrop.
VtFrameStyleThickOuter | A thin inner line and a thick outer line enclose the backdrop.


HorizontalAlignment Constants

The VtHorizontalAlignment constants provide options for text alignment.

Constant | Description
VtHorizontalAlignmentLeft | All lines of text are aligned on the left margin.
VtHorizontalAlignmentRight | All lines of text are aligned on the right margin.
VtHorizontalAlignmentCenter | All lines of text are centered horizontally.


LabelComponent Constants

The VtChLabelComponent constants provide options for displaying chart labels.

Constant | Description
VtChLabelComponentValue | The value of the data point appears in the label. Data points in XY, Polar, and Bubble charts actually have two or three values. The default label for these chart types display all values in a standard format. You can customize this format to highlight an individual data value.
VtChLabelComponentPercent | The value of the data point is displayed in the label as a percentage of the total value of the series.
VtChLabelComponentSeriesName | The series name is used to label the data point. This name is taken from the label associated with the column in the data grid.
VtChLabelComponentPointName | The data point name is used to label the data point.


LabelLineStyle Constants

The VtChLabelLineStyle constants provide options for displaying lines connecting a label and series.

The following table lists the valid constants for VtChLabelLineStyle:

Constants | Description
VtChLabelLineStyleNone | No line connects the label and series.
VtChLabelLineStyleStraight | A straight line connects the label and series.
VtChLabelLineStyleBent | A bent line connects the label and series.


LabelLocationType Constants

The VtChLabelLocationType constants provide options for determining series label location.

The following table lists the valid constants for VtChLabelLocationType:

Constants | Description
VtChLabelLocationTypeNone | No label displayed.
VtChLabelLocationTypeAbovePoint | The label is displayed above the data point.
VtChLabelLocationTypeBelowPoint | The label is displayed below the data point.
VtChLabelLocationTypeCenter | The label is displayed centered on the data point.
VtChLabelLocationTypeBase | The label is displayed at the base along the category axis, directly beneath the data point.
VtChLabelLocationTypeInside | The label is displayed inside a pie slice.
VtChLabelLocationTypeOutside | The label is displayed outside a pie slice.
VtChLabelLocationTypeLeft | The label is displayed to the left of the data point.
VtChLabelLocationTypeRight | The label is displayed to the right of the data point.


LocationType Constants

VtChLocationType provides location options for chart elements.

Constant | Example
VtChLocationTypeTop | Top
VtChLocationTypeTopLeft | Top Left
VtChLocationTypeTopRight | Top Right
VtChLocationTypeLeft | Left
VtChLocationTypeRight | Right
VtChLocationTypeBottom | Bottom
VtChLocationTypeBottomLeft | Bottom Left
VtChLocationTypeBottomRight | Bottom Right
VtChLocationTypeCustom | Custom


MarkerStyle Constants

The VtMarkerStyle constants provide options for displaying data point markers.

Constant | Description
VtMarkerStyleNull | Suppressed
VtMarkerStyleDash | Dash marker
VtMarkerStylePlus | Plus marker
VtMarkerStyleX | X marker
VtMarkerStyleStar | Star marker
VtMarkerStyleCircle | Circle marker
VtMarkerStyleSquare | Square marker
VtMarkerStyleDiamond | Diamond marker
VtMarkerStyleUpTriangle | Triangle marker
VtMarkerStyleDownTriangle | Down triangle marker
VtMarkerStyleFilledCircle | Filled circle marker
VtMarkerStyleFilledSquare | Filled square marker
VtMarkerStyleFilledDiamond | Filled diamond marker
VtMarkerStyleFilledUpTriangle | Filled triangle marker
VtMarkerStyleFilledDownTriangle | Filled down triangle marker
VtMarkerStyle3dBall | Three-dimensional ball marker


MouseFlag Constants

VtChMouseFlag indicates which keyboard key is being held down while the mouse button is clicked.

Constant | Description
VtChMouseFlagShiftKeyDown | The SHIFT key is held down when the mouse button is clicked.
VtChMouseFlagControlKeyDown | The CONTROL key is held down when the mouse button is clicked.


MousePointer Constants

The VtMousePointer constants provide the following types of pointers.

Constant | Description
VtMousePointerArrow | Arrow pointer
VtMousePointerArrowHourGlass | Arrow and hourglass
VtMousePointerArrowQuestion | Arrow and question mark
VtMousePointerCross | Crosshair pointer
VtMousePointerDefault | Default chart pointer
VtMousePointerHourGlass | Hourglass pointer
VtMousePointerIbeam | Ibeam pointer
VtMousePointerIcon | Small square within a square pointer
VtMousePointerNoDrop | No drop pointer
VtMousePointerSize | Sizing arrows
VtMousePointerSizeAll | Sizing in all directions arrows
VtMousePointerSizeNESW | Double arrow pointing northeast and southwest
VtMousePointerNS | Double arrow pointing north and south
VtMousePointerNWSE | Double arrow pointing northwest and southeast
VtMousePointerWE | Double arrow pointing east and west
VtMousePointerUpArrow | Arrow pointing up


Orientation Constants

The VtOrientation constants provide options for positioning text.

Constant | Description
VtOrientationHorizontal | The text is displayed horizontally.
VtOrientationVertical | The letters of the text are drawn one on top of each other from the top down.
VtOrientationUp | The text is rotated to read from bottom to top.
VtOrientationDown | The text is rotated to read from top to bottom.


PartType Constants

The VtChPartType constants provide options for chart elements.

Constant | Description
VtChPartTypeChart | Identifies the chart control.
VtChPartTypeTitle | Identifies the chart title.
VtChPartTypeFootnote | Identifies the chart footnote.
VtChPartTypeLegend | Identifies the chart legend.
VtChPartTypePlot | Identifies the chart plot.
VtChPartTypeSeries | Identifies a chart series.
VtChPartTypePoint | Identifies an individual data point.
VtChPartTypePointLabel | Identifies a data point label.
VtChPartTypeAxis | Identifies an axis.
VtChPartTypeAxisLabel | Identifies an axis label.
VtChPartTypeAxisTitle | Identifies an axis title.


PenCap Constants

VtPenCap provides methods for displaying line endings.

Constant | Description
VtPenCapButt | The line is squared off at the endpoint.
VtPenCapRound | A semicircle with the diameter of the line thickness is drawn at the end of the line.
VtPenCapSquare | The line continues beyond the endpoint for a distance equal to half the line thickness and is squared off.


PenJoin Constants

The VtPenJoin constants provide options for joining line segments in a series.

Constant | Description
VtPenJoinMiter | The outer edges of the two lines are extended until they meet.
VtPenJoinRound | A circular arc is drawn around the point where the two lines meet.
VtPenJoinBevel | The notch between the ends of two joining lines is filled.


PenStyle Constants

The VtPenStyle constants provide options for the pen used to draw chart lines.

Constant | Description
VtPenStyleNull | No pen is applied
VtPenStyleSolid | Solid line pen
VtPenStyleDashed | Dashed line pen
VtPenStyleDotted | Dotted line pen
VtPenStyleDashDot | Dash-dot line pen
VtPenStyleDashDotDot | Dash-dot-dot line pen
VtPenStyleDitted | Ditted line pen
VtPenStyleDashDit | Dash-ditted line pen
VtPenStyleDashDitDit | Dash-dit-dit line pen


PercentAxisBasis Constants

VtChPercentAxisBasis provides methods of displaying percentage axes.

Constant | Description
VtChPercentAxisBasisMaxChart | The largest value in the chart is considered 100 percent and all other values on the chart are displayed as percentages of that value.
VtChPercentAxisBasisMaxRow | The largest value in each row is considered 100 percent and all other values in that row are displayed as percentages of that value.
VtChPercentAxisBasisMaxColumn | The largest value in each series is considered 100 percent and all other values in that series are displayed as percentages of that value.
VtChPercentAxisBasisSumChart | All values in the chart are added together, and that value is considered 100 percent. All other values are displayed as percentages of that value.
VtChPercentAxisBasisSumRow | All values in each row are added together and the total value for each row is considered 100 percent. All other values in that same row are displayed as percentages of that value. This is the basis for 100 percent stacked charts.
VtChPercentAxisBasisSumColumn | All values in each series are added together to give a total value for each series. All values are displayed as a percentage of their series total value.


PieWeightBasis Constants

The VtChPieWeightBasis constants provide options for displaying pie chart slices.

Constant | Description
VtChPieWeightBasisNone | All pies are drawn the same size.
VtChPieWeightBasisTotal | The slice values in each pie are totaled and the pie with the highest total identified. The size of each pie in the chart is determined by the ratio of its total value compared to the largest pie.
VtChPieWeightBasisSeries | The first column of data in the data grid holds the relative size index. In other words, if you have 5 categories, you can control the size of the pies representing each category by using the first column of the data grid to number the rows 1 through 5. The size of the pie is determined by the ratio of its first column value and the largest value in the first column. The pie containing the 1 is the largest pie; the one containing the 5 the smallest. It is most common to exclude this first column of data so that the values are not drawn as a pie slice.


PieWeightStyle Constants

The VtChPieWeightStyle constants provide options for displaying individual pies within a single chart.

Constant | Description
VtChPieWeightStyleArea | The area of the individual pies changes, based on their weighting.
VtChPieWeightStyleDiameter | The diameter of the individual pies changes, based on their weighting.


ProjectionType Constants

VtProjectionType provides viewpoint and perspective options for displaying and viewing a chart.

Constants | Description
VtProjectionTypePerspective | This provides the most realistic three-dimensional appearance. Objects farther away from you converge toward a vanishing point. This is the default projection.
VtProjectionTypeOblique | This is sometimes referred to as 2.5 dimensional. The chart does have depth, but the xy plane does not change when the chart is rotated or elevated.
VtProjectionTypeOrthogonal | Perspective is not applied in this three-dimensional view. The major advantage of using this type of projection is that vertical lines remain vertical, making some charts easier to read.


ScaleType Constants

VtChScaleType provides methods for plotting chart values and displaying the chart scale.

Constant | Description
VtChScaleTypeLinear | Chart values are plotted in a linear scale with values ranging from the minimum to the maximum chart range value.
VtChScaleTypeLogarithmic | Chart values are plotted in a logarithmic scale with values based on a specific log scale set with the logBase argument of this function.
VtChScaleTypePercent | Chart values are plotted in a linear scale with values based on the percentages of the chart range values.


SeriesType Constants

The VtChSeriesType constants provide options for types of series.

Constant | Series Type
VtChSeriesType3dBar | 3D Bar
VtChSeriesType2dBar | 2D Bar
VtChSeriesType3dLine | 3D Line
VtChSeriesType2dLine | 2D Line
VtChSeriesType3dArea | 3D Area
VtChSeriesType2dArea | 2D Area
VtChSeriesType3dStep | 3D Step
VtChSeriesType2dStep | 2D Step
VtChSeriesType2dXY | XY
VtChSeriesType2dPie | 2D Pie


ShadowStyle Constants

The VtShadowStyle constants provides shadow options.

Constant | Description
VtShadowStyleNull | No shadow.
VtShadowStyleDrop | Drop shadow.


SortType Constants

The VtSortType constants provide options for sorting pie charts.

Constant | Description
VtSortTypeNone | Pie slices are drawn in the order the data appears in the data grid.
VtSortTypeAscending | Pie slices are drawn, in order, from the smallest to the largest slice, starting at the defined starting angle and in the defined plot direction.
VtSortTypeDescending | Pie slices are drawn, in order, from the largest to the smallest slice, starting at the defined starting angle and in the defined plot direction.


StatsType Constants

The VtChStats constants provide methods of displaying statistic lines on a chart.

Constant | Description
VtChStatsMinimum | Shows the minimum value in the series.
VtChStatsMaximum | Shows the maximum value in the series.
VtChStatsMean | Shows the mathematical mean of the values in the series.
VtChStatsStddev | Shows the standard deviation of the values in the series.
VtChStatsRegression | Shows a trend line indicated by the values in a series.


SubPlotLabelLocationType Constants

The VtSubPlotLabelLocationType constants provide methods for displaying the subplot label.

Constant | Description
VtChSubPlotLabelLocationTypeNone | No subplot label is displayed.
VtChSubPlotLabelLocationTypeAbove | The subplot label is displayed above the pie.
VtChSubPlotLabelLocationTypeBelow | The subplot label is displayed below the pie.
VtChSubPlotLabelLocationTypeCenter | The subplot label is centered on the pie.


TextLengthType Constants

The VtTextLengthType constants provide options for optimizing text layout for the screen or for the printer.

Constant | Description
VtTextLengthTypeVirtual | Choose this constant to use TrueType virtual font metrics to optimize text layout for printing. TrueType virtual font metrics may not be very accurate for text displayed on the screen. Text displayed on the screen may be a larger or smaller than the virtual metrics requested. Larger text may not fit where it is supposed to and part of a character, a whole character, or even in some cases words may be clipped.
VtTextLengthTypeDevice | Choose this constant to optimize text layout for the screen. Text in charts laid out for screen display always fits correctly within its chart area. The printed text is generally a bit smaller and so the text may appear in slightly different places.


TextOutputType Constants

The VtTextOutputType constants provide methods of outputting text.

Constant | Description
VtTextOutputTypeHardware | Device context type Null.
VtTextOutputTypePolygon | Device context type Metafile.


UpdateFlags Constants

The UpdateFlags constants listed below can be used in various events to determine what part of the chart is being updated.

Constant | Value | Description
VtChNoDisplay | 0 | Absence of update flags; the chart display is not affected.
VtChDisplayPlot | 1 | Update will cause the plot to repaint.
VtChLayoutPlot | 2 | Update will cause the plot to layout.
VtChDisplayLegend | 4 | Update will cause the legend to repaint.
VtChLayoutLegend | 8 | Update will cause the legend to layout.
VtChLayoutSeries | 16 | Update will cause the series to lay out.
VtChPositionSection | 32 | A chart section has been moved or resized.

Remarks

The constants can be used in the following events:

AxisLabelUpdated Event

AxisTitleUpdated Event

AxisUpdated

ChartUpdated Event

DataUpdated Event

FootnoteUpdated Event

LegendUpdated Event

PlotUpdated Event

PointLabelUpdated Event

PointUpdated Event

SeriesUpdated Event

TitleUpdated Event


VerticalAlignment Constants

The VtVerticalAlignment constants provide methods of vertically aligning text.

Constant | Description
VtVerticalAlignmentTop | All lines of text are aligned at the top margin.
VtVerticalAlignmentBottom | All lines of text are aligned at the bottom margin.
VtVerticalAlignmentCenter | All lines of text are centered vertically.


AxisActivated Event

Occurs when the user double clicks on a chart axis.

Syntax

Private Sub object_AxisActivated (axisId As Integer, axisIndex As Integer, mouseFlags As Integer, cancel As Integer )

The AxisActivated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
axisId | Integer. An integer that identifies a specific axis, as described in Settings.
axisIndex | Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
mouseFlags | Integer. An integer that indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. An integer that is not used at this time.

Settings

The event handler determines which axis is activated and sets axisId to:

Constants | Description
VtChAxisIdX | If the x axis is affected.
VtChAxisIdY | If the y axis is affected.
VtChAxisIdY2 | If the secondary y axis is affected.
VtChAxisIdZ | If the z axis is affected.

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


AxisLabelActivated Event

Occurs when the user double clicks on an axis label.

Syntax

Private Sub object_AxisLabelActivated (axisId As Integer, axisIndex As Integer, labelSetIndex As Integer, labelIndex As Integer, mouseFlags As Integer, cancel As Integer)

The AxisLabelActivated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
axisId | Integer. An integer that identifies a specific axis, as described in Settings.
axisIndex | Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
labelSetIndex | Integer. An integer that identifies the level of labels you are double clicking on. Levels of labels are numbered from the axis out, beginning with 1.
labelIndex | Integer. An integer that is currently unused.
mouseFlags | Integer. An integer that indicates if a key is held down when the mouse button is clicked.
cancel | Integer. An integer that is not used at this time.

Settings

The event handler determines which axis label is activated and sets axisId to:

Constants | Description
VtChAxisIdX | If the x axis is affected.
VtChAxisIdY | If the y axis is affected.
VtChAxisIdY2 | If the secondary y axis is affected.
VtChAxisIdZ | If the z axis is affected.

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


AxisLabelSelected Event

Occurs when the user clicks an axis label.

Syntax

Private Sub object_AxisLabelSelected ( axisId As Integer, axisIndex As Integer, labelSetIndex As Integer, labelIndex As Integer, mouseFlags As Integer, cancel As Integer )

The AxisLabelSelected event syntax has these parts.

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
axisId | Integer. An integer that identifies a specific axis, as described in Settings.
axisIndex | Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
labelSetIndex | Integer. An integer that identifies the level of labels you are double clicking on. Levels of labels are numbered from the axis out, beginning with 1.
labelIndex | Integer. An integer that is currently unused.
mouseFlags | Integer. An integer that indicates if a key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. An integer that is not used at this time.

Settings

The event handler determines which axis label is selected and sets axisId to:

Constants | Description
VtChAxisIdX | If the x axis is affected.
VtChAxisIdY | If the y axis is affected.
VtChAxisIdY2 | If the secondary y axis is affected.
VtChAxisIdZ | If the z axis is affected.

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


AxisLabelUpdated Event

Occurs when an axis label has changed.

Syntax

Private Sub object_AxisLabelUpdated (axisId As Integer, axisIndex As Integer, labelSetIndex As Integer, labelIndex As Integer, updateFlags As Integer)

The AxisLabelUpdated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
axisId | Integer. An integer that identifies a specific axis, as described in Settings.
axisIndex | Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
labelSetIndex | Integer. An integer that identifies the level of labels you are double clicking on. Levels of labels are numbered from the axis out, beginning with 1.
labelIndex | Integer. An integer that is currently unused.
updateFlags | Integer. An integer provides information about the update of the label, as described in Settings.

Settings

The event handler determines which axis label is updated and sets axisId to:

Constants | Description
VtChAxisIdX | If the x axis is affected.
VtChAxisIdY | If the y axis is affected.
VtChAxisIdY2 | If the secondary y axis is affected.
VtChAxisIdZ | If the z axis is affected.

The event handler determines the affect of the update, and sets updateFlags to:

Constants | Description
VtChNoDisplay | Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot | Update will cause the plot to repaint.
VtChLayoutPlot | Update will cause the plot to lay out.
VtChDisplayLegend | Update will cause the legend to repaint.
VtChLayoutLegend | Update will cause the legend to lay out.
VtChLayoutSeries | Update will cause the series to lay out.
VtChPositionSection | A chart section has been moved or resized.


AxisSelected Event

Occurs when the user clicks on a chart axis.

Syntax

Private Sub object_AxisSelected (axisId As Integer, axisIndex As Integer, mouseFlags As Integer, cancel As Integer )

The AxisSelected event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
axisId | Integer. An integer that identifies a specific axis, as described in Settings.
axisIndex | Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
mouseFlags | Integer. An integer that indicates whether key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. An integer that is not used at this time.

Settings

The event handler determines which axis is selected and sets axisId to:

Constants | Value | Description
VtChAxisIdX | 0 | If the x axis is affected.
VtChAxisIdY | 1 | If the y axis is affected.
VtChAxisIdY2 | 2 | If the secondary y axis is affected.
VtChAxisIdZ | 3 | If the z axis is affected.
VtChAxisIDNone | 4 | No axis.

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


AxisTitleActivated Event

Occurs when the user double clicks on an axis title.

Syntax

Private Sub object_AxisTitleActivated (axisId As Integer, axisIndex As Integer, mouseFlags As Integer, cancel As Integer )

The AxisTitleActivated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
axisId | Integer. An integer that identifies a specific axis.
AxisIndex | Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
mouseFlags | Integer. An integer that indicates whether a key is held down when the mouse button is clicked.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines which axis title is activated and sets axisId to:

Constants | Value | Description
VtChAxisIdX | 0 | If the x axis is affected.
VtChAxisIdY | 1 | If the y axis is affected.
VtChAxisIdY2 | 2 | If the secondary y axis is affected.
VtChAxisIdZ | 3 | If the z axis is affected.
VtChAxisIDNone | 4 | No axis.

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


AxisTitleSelected Event

Occurs when the user clicks on an axis title.

Syntax

Private Sub object_AxisTitleSelected ( axisId As Integer, axisIndex As Integer, mouseFlags As Integer, cancel As Integer )

The AxisTitleSelected event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
axisId | Integer. An integer that identifies a specific axis.
AxisIndex | Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
mouseFlags | Integer. An integer that indicates whether a key is held down when the mouse button is clicked.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines which axis title is selected and sets axisId to:

Constants | Value | Description
VtChAxisIdX | 0 | If the x axis is affected.
VtChAxisIdY | 1 | If the y axis is affected.
VtChAxisIdY2 | 2 | If the secondary y axis is affected.
VtChAxisIdZ | 3 | If the z axis is affected.
VtChAxisIDNone | 4 | No axis.

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


AxisTitleUpdated Event

Occurs when an axis title has changed.

Syntax

Private Sub object_AxisTitleUpdated ( axisId As Integer, axisIndex As Integer, updateFlags As Integer)

The AxisTitleUpdated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
axisId | Integer. An integer that identifies a specific axis.
axisIndex | Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
updateFlags | Integer. An integer that provides information about the update of the title.

Settings

The event handler determines which axis title is updated and sets axisId to:

Constants | Value | Description
VtChAxisIdX | 0 | If the x axis is affected.
VtChAxisIdY | 1 | If the y axis is affected.
VtChAxisIdY2 | 2 | If the secondary y axis is affected.
VtChAxisIdZ | 3 | If the z axis is affected.
VtChAxisIDNone | 4 | No axis.

The following table lists the constants for updateFlags.

Constants | Description
VtChNoDisplay | Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot | Update will cause the plot to repaint.
VtChLayoutPlot | Update will cause the plot to lay out.
VtChDisplayLegend | Update will cause the legend to repaint.
VtChLayoutLegend | Update will cause the legend to lay out.
VtChLayoutSeries | Update will cause the series to lay out.
VtChPositionSection | A chart section has been moved or resized.


AxisUpdatedEvent

Occurs when an axis has changed.

Syntax

Private Sub object_AxisUpdated ( axisId As Integer, axisIndex As Integer, updateFlags As Integer)

The AxisUpdated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
axisId | Integer. An integer that identifies a specific axis.
axisIndex | Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
updateFlags | Integer. An integer that provides information about the update of the axis.

Settings

The event handler determines which axis is updated and sets axisId to:

Constants | Value | Description
VtChAxisIdX | 0 | If the x axis is affected.
VtChAxisIdY | 1 | If the y axis is affected.
VtChAxisIdY2 | 2 | If the secondary y axis is affected.
VtChAxisIdZ | 3 | If the z axis is affected.
VtChAxisIDNone | 4 | No axis.

The following table lists the constants for updateFlags.

Constants | Description
VtChNoDisplay | Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot | Update will cause the plot to repaint.
VtChLayoutPlot | Update will cause the plot to lay out.
VtChDisplayLegend | Update will cause the legend to repaint.
VtChLayoutLegend | Update will cause the legend to lay out.
VtChLayoutSeries | Update will cause the series to lay out.
VtChPositionSection | A chart section has been moved or resized.


ChartActivated Event

Occurs when the user double clicks the Microsoft Chart control, but not on a specific element in the chart.

Syntax

Private Sub object_ChartActivated (mouseFlags As Integer, cancel As Integer)

The ChartActivated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


ChartSelected Event

Occurs when the user clicks the Microsoft Chart control, but not on a specific element in the chart.

Syntax

Private Sub object_ChartSelected (mouseFlags As Integer, cancel As Integer)

The ChartSelected event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


ChartUpdated Event

Occurs when the chart has changed.

Syntax

Private Sub object_ChartUpdated (updateFlags As Integer)

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
updateFlags | Integer. Provides information about the update of the chart, as described in Settings.

Settings

The following table lists the constants for updateFlags.

Constant | Description
VtChNoDisplay | Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot | Update will cause the plot to repaint.
VtChLayoutPlot | Update will cause the plot to lay out.
VtChDisplayLegend | Update will cause the legend to repaint.
VtChLayoutLegend | Update will cause the legend to lay out.
VtChLayoutSeries | Update will cause the series to lay out.
VtChPositionSection | A chart section has been moved or resized.


DataUpdated Event

Occurs when the chart data grid has changed.

Syntax

Private Sub object_DataUpdated (row As Integer, column As Integer, labelRow As Integer, labelColumn As Integer, labelSetIndex As Integer, updateFlags As Integer)

The DataUpdated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
row | Integer. Indicates the row in the data grid.
column | Integer. Indicates the column in the datagrid.
labelRow | Integer. Indicates the row label.
labelColumn | Integer. Indicates the column label.
labelSetIndex | Integer. Identifies the level of labels. Levels of labels are numbered from the axis out, beginning with 1.
updateFlags | Integer. Provides information about the update of the data, as described in Settings.

Settings

The following table lists the constants for updateFlags.

Constant | Description
VtChNoDisplay | Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot | Update will cause the plot to repaint.
VtChLayoutPlot | Update will cause the plot to lay out.
VtChDisplayLegend | Update will cause the legend to repaint.
VtChLayoutLegend | Update will cause the legend to lay out.
VtChLayoutSeries | Update will cause the series to lay out.
VtChPositionSection | A chart section has been moved or resized.

Remarks

If row and column are nonzero, the change occurs to the indicated data cell. If labelRow or labelColumn, along with labelSetIndex, are nonzero, the indicated row or column label changes. If none of these are nonzero, no specific information about the change is available.


DonePainting Event

Occurs immediately after the chart repaints or redraws.

Syntax

Private Sub object_DonePainting ()

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


FootnoteActivated Event

Occurs when the user double clicks the chart footnote.

Syntax

Private Sub object_FootnoteActivated(mouseFlags As Integer, cancel As Integer)

The FootnoteActivated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


FootnoteSelected Event

Occurs when the user clicks the chart footnote.

Syntax

Private Sub object_FootnoteSelected (mouseFlags As Integer, cancel As Integer)

The FootnoteSelected event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


FootnoteUpdated Event

Occurs when the chart footnote changes.

Syntax

Private Sub object_FootnoteUpdated (updateFlags As Integer)

The FootnoteUpdated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
updateFlags | Integer. Provides information about the update of the footnote, as described in Settings.

Settings

The following table lists the constants for updateFlags.

Constant | Description
VtChNoDisplay | Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot | Update will cause the plot to repaint.
VtChLayoutPlot | Update will cause the plot to lay out.
VtChDisplayLegend | Update will cause the legend to repaint.
VtChLayoutLegend | Update will cause the legend to lay out.
VtChLayoutSeries | Update will cause the series to lay out.
VtChPositionSection | A chart section has been moved or resized.


LegendActivated Event

Occurs when the user double clicks on the chart legend.

Syntax

Private Sub object_LegendActivated (mouseFlags As Integer, cancel As Integer)

The LegendActivated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


LegendSelected Event

Occurs when the user clicks on the chart legend.

Syntax

Private Sub object_LegendSelected (mouseFlags As Integer, cancel As Integer)

The LegendSelected event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


LegendUpdated Event

Occurs when the chart legend has changed.

Syntax

Private Sub object_LegendUpdated (updateFlags As Integer)

The LegendUpdated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
updateFlags | Integer. Provides information about the update of the legend, as described in Settings.

Settings

The following table lists the constants for updateFlags.

Constant | Description
VtChNoDisplay | Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot | Update will cause the plot to repaint.
VtChLayoutPlot | Update will cause the plot to lay out.
VtChDisplayLegend | Update will cause the legend to repaint.
VtChLayoutLegend | Update will cause the legend to lay out.
VtChLayoutSeries | Update will cause the series to lay out.
VtChPositionSection | A chart section has been moved or resized.


PlotActivated Event

Occurs when the user double clicks the chart plot.

Syntax

Private Sub object_PlotActivated (mouseFlags As Integer, cancel As Integer)

The PlotActivated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


PlotSelected Event

Occurs when the user clicks the chart plot.

Syntax

Private Sub object_PlotSelected (mouseFlags As Integer, cancel As Integer)

The PlotSelected event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


PlotUpdated Event

Occurs when the chart plot has changed.

Syntax

Private Sub object_PlotUpdated (updateFlags As Integer)

The PlotUpdated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
updateFlags | Integer. Provides information about the update of the plot, as described in Settings.

Settings

The following table lists the constants for updateFlags.

Constant | Description
VtChNoDisplay | Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot | Update will cause the plot to repaint.
VtChLayoutPlot | Update will cause the plot to lay out.
VtChDisplayLegend | Update will cause the legend to repaint.
VtChLayoutLegend | Update will cause the legend to lay out.
VtChLayoutSeries | Update will cause the series to lay out.
VtChPositionSection | A chart section has been moved or resized.


PointActivated Event

Occurs when the user double clicks on a data point.

Syntax

Private Sub object_PointActivated (series As Integer, dataPoint As Integer, mouseFlags As Integer, cancel As Integer)

The PointActivated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
series | Integer. Identifies the series containing the data point. Series are numbered in the order that their columns appear in the data grid, beginning with 1.
dataPoint | Integer. Identifies the data point's position in the series. Points are numbered in the order that their rows appear in the data grid, beginning with 1.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


PointLabelActivated Event

Occurs when the user double clicks a data point label.

Syntax

Private Sub object_PointLabelActivated (series As Integer, dataPoint As Integer, mouseFlags As Integer, cancel As Integer)

The PointLabelActivated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
series | Integer. Identifies the series containing the data point. Series are numbered in the order that their columns appear in the data grid, beginning with 1.
dataPoint | Integer. Identifies the data point's position in the series. Points are numbered in the order that their rows appear in the data grid, beginning with 1.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


PointLabelSelected Event

Occurs when the user clicks a data point label.

Syntax

Private Sub object_PointLabelSelected (series As Integer, dataPoint As Integer, mouseFlags As Integer, cancel As Integer)

The PointLabelSelected event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
series | Integer. Identifies the series containing the data point. Series are numbered in the order that their columns appear in the data grid, beginning with 1.
dataPoint | Integer. Identifies the data point's position in the series. Points are numbered in the order that their rows appear in the data grid, beginning with 1.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


PointLabelUpdated Event

Occurs when a data point label has changed.

Syntax

Private Sub object_PointLabelUpdated (series As Integer, dataPoint As Integer, updateFlags As Integer)

The PointLabelUpdated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
series | Integer. Identifies the series containing the data point. Series are numbered in the order that their columns appear in the data grid, beginning with 1.
dataPoint | Integer. Identifies the data point's position in the series. Points are numbered in the order that their rows appear in the data grid, beginning with 1.
updateFlags | Integer. Provides information about the update of the data point label, as described in Settings.

Settings

The following table lists the constants for updateFlags.

Constant | Description
VtChNoDisplay | Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot | Update will cause the plot to repaint.
VtChLayoutPlot | Update will cause the plot to lay out.
VtChDisplayLegend | Update will cause the legend to repaint.
VtChLayoutLegend | Update will cause the legend to lay out.
VtChLayoutSeries | Update will cause the series to lay out.
VtChPositionSection | A chart section has been moved or resized.


PointSelected Event

Occurs when the user clicks a data point.

Syntax

Private Sub object_PointSelected ( series As Integer, dataPoint As Integer, mouseFlags As Integer, cancel As Integer )

The PointSelected event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
series | Integer. Identifies the series containing the data point. Series are numbered in the order that their columns appear in the data grid, beginning with 1.
dataPoint | Integer. Identifies the data point's position in the series. Points are numbered in the order that their rows appear in the data grid, beginning with 1.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


PointUpdated Event

Occurs when a data point has changed.

Syntax

Private Sub object_PointUpdated (series As Integer, dataPoint As Integer, updateFlags As Integer)

The PointUpdated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
series | Integer. Identifies the series containing the data point. Series are numbered in the order that their columns appear in the data grid, beginning with 1.
dataPoint | Integer. Identifies the data point's position in the series. Points are numbered in the order that their rows appear in the data grid, beginning with 1.
updateFlags | Integer. Provides information about the update of the data point, as described in Settings.

Settings

The following table lists the constants for updateFlags.

Constant | Description
VtChNoDisplay | Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot | Update will cause the plot to repaint.
VtChLayoutPlot | Update will cause the plot to lay out.
VtChDisplayLegend | Update will cause the legend to repaint.
VtChLayoutLegend | Update will cause the legend to lay out.
VtChLayoutSeries | Update will cause the series to lay out.
VtChPositionSection | A chart section has been moved or resized.


SeriesActivated Event

Occurs when the user double clicks a chart series. You can replace the standard user interface by canceling the event and displaying your own dialog box.

Syntax

Private Sub object_SeriesActivated (series As Integer, mouseFlags As Integer, cancel As Integer)

The SeriesActivated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
series | Integer. Identifies the series containing the data point. Series are numbered in the order that their columns appear in the data grid, beginning with 1.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


SeriesSelected Event

Occurs when the user clicks a chart series.

Syntax

Private Sub object_SeriesSelected (series As Integer, mouseFlags As Integer, cancel As Integer)

The SeriesSelected event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
series | Integer. Identifies the series containing the data point. Series are numbered in the order that their columns appear in the data grid, beginning with 1.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


SeriesUpdated Event

Occurs when a chart series has changed.

Syntax

Private Sub object_SeriesUpdated (series As Integer, updateFlags As Integer)

The SeriesUpdated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
series | Integer. Identifies the series containing the data point. Series are numbered in the order that their columns appear in the data grid, beginning with 1.
updateFlags | Integer. Provides information about the update of the series, as described in Settings.

Settings

The following table lists the constants for updateFlags.

Constant | Description
VtChNoDisplay | Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot | Update will cause the plot to repaint.
VtChLayoutPlot | Update will cause the plot to lay out.
VtChDisplayLegend | Update will cause the legend to repaint.
VtChLayoutLegend | Update will cause the legend to lay out.
VtChLayoutSeries | Update will cause the series to lay out.
VtChPositionSection | A chart section has been moved or resized.


TitleActivated Event

Occurs when the user double clicks the chart title. You can replace the standard user interface by canceling the event and displaying your own dialog box.

Syntax

Private Sub object_TitleActivated (mouseFlags As Integer, cancel As Integer )

The TitleActivated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


TitleSelected Event

Occurs when the user clicks the chart title.

Syntax

Private Sub object_TitleSelected (mouseFlags As Integer, cancel As Integer)

The TitleSelected event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
mouseFlags | Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel | Integer. This argument is not used at this time.

Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlags to:

Constants | Description
VtChMouseFlagShiftKeyDown | If the SHIFT key is held down.
VtChMouseFlagControlKeyDown | If the CONTROL key is held down.


TitleUpdated Event

Occurs when the chart title has changed.

Syntax

Private Sub object_TitleUpdated (updateFlags As Integer)

The TitleUpdated event syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
updateFlags | Provides information about the update of the title, as described in Settings.

Settings

The following table lists the constants for updateFlags.

Constant | Description
VtChNoDisplay | Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot | Update will cause the plot to repaint.
VtChLayoutPlot | Update will cause the plot to lay out.
VtChDisplayLegend | Update will cause the legend to repaint.
VtChLayoutLegend | Update will cause the legend to lay out.
VtChLayoutSeries | Update will cause the series to lay out.
VtChPositionSection | A chart section has been moved or resized.


Error Messages (MSChart Control)

The MSChart control's errors that occur during program execution are handled like other errors. You must write your own error handling routine to trap and manage errors.

The following table lists the errors that can be trapped by exception handling.

Error Name | Explanation
GetNotSupported | Attempted to read a write-only property.
InvalidPropertyValue | Value is not appropriate for the property used.
SetNotSupported | Attempted to write to a read-only property.
VtChError | Function failed with a non-specific error.
VtChErrorInvalidAxis | One of the arguments in a method is a reference to an axis that does not exist on the chart.
VtChErrorInvalidHandle | Invalid chart handle passed.
VtChErrorInvalidSeriesNumber | One of the arguments in a method is a reference to a series that does not exist on the chart.
VtChErrorNoData | Data necessary for the completion of the task is unavailable.
VtChErrorRestrictedVersion | The requested feature is not available in this version of the product.
VtErrorActionCanceled | User canceled operation. The user clicked outside the menu instead of selecting an item.
VtErrorArchivePointerMismatch | Tried to load a pointer into a reference.
VtErrorArchiveTypeMismatch | Encountered unexpected class type.
VtErrorArchiveVersion | Tried to load incompatible version.
VtErrorBufferTooSmall | String buffer is not large enough to hold the requested string. String has been truncated to fit the buffer.
VtErrorCannotOpenFile | Unable to open the requested file.
VtErrorCopyingObject | Failed to copy object.
VtErrorCorruptArchive | Persistent storage is corrupted.
VtErrorCorruptData | An internal error indicating that the MSChart control has encountered corrupt data and is unable to continue the requested action.
VtErrorCreateWindow | Could not create window.
VtErrorDefaultFontSubstituted | Default substituted for requested font.
VtErrorDeletingDeletedObject | An internal error indicating that the MSChart control attempted to delete an object that has already been deleted.
VtErrorDeletingUsedObject | An internal error indicating that the MSChart control attempted to delete an object that is still in use.
VtErrorDisplay | The MSChart control is unable to properly communicate with display drivers.
VtErrorDuplicateObject | Encountered duplicate object.
VtErrorDuplicateSymbol | Duplicate symbol.
VtErrorIconNotFound | Could not load icon.
VtErrorIdentifierTooBig | Identifier is too large.
VtErrorInvalidArgument | One of the function arguments was bad.
VtErrorInvalidFont | Requested font description is invalid.
VtErrorInvalidFontName | Requested font name is not available.
VtErrorInvalidIndex | Given index is out of bounds.
VtErrorInvalidObject | Object is uninitialized or invalid.
VtErrorInvalidRequest | The requested action is inappropriate or otherwise invalid.
VtErrorInvalidSyntax | Encountered invalid syntax.
VtErrorInvalidTypeConversion | Requested type conversion is not supported.
VtErrorLoadPicture | Could not load requested picture.
VtErrorNoDisplayResources | The MSChart control does not have enough display resources to properly display the chart.
VtErrorNoMemory | There is not enough memory to accomplish the requested action.
VtErrorNotFound | Cannot find the item for which the function is looking.
VtErrorNotImplemented | Feature is not yet implemented.
VtErrorOSVersion | Version of Windows is not supported.
VtErrorStreamIo | An error was encountered when trying to read or write a file.
VtErrorTooSmall | The returned result is longer than the return buffer size. A NULL string is placed in the buffer.
VtErrorUnableToLoadString | Unable to load a string; the string may have been too long.
VtErrorUnexpectedEOS | Encountered unexpected end of string.
VtErrorUnrecognizedFunction | Encountered unrecognized function.
VtErrorUserIo | An attempt to write a file to a user-created function failed.
VtFail | A general failure error.
VtOk | No error occurred.


Add Method (LightSources Collection)

Adds a LightSource object to the LightSources collection.

Syntax

object.Add (x,y,z,intensity)

The Add method syntax has these parts:

Part | Description
collection | A object expression that evaluates to an object in the Applies To list.
x, y, z | Integers. Indicate the light source location.
intensity | Single. Indicates the light source intensity.

Remarks

Setting x, y, and z to zero generates a VtChInvalidArgument error.


Count Method

Returns the number of objects in a collection.

Syntax

object.Count

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


DeleteColumnLabels Method

Deletes levels of labels from the data columns in a data grid associated with a chart.

Syntax

object.DeleteColumnLabels (labelIndex, count)

The DeleteColumnLabels method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
labelIndex | Integer. Identifies the number of the first level of labels you want to delete. Column label levels are numbered bottom to top, beginning with 1.
count | Integer. Specifies the number of label levels you want to delete. The number of columns being deleted is calculated from the column identified in labelIndex up.


DeleteColumns Method

Deletes columns of data and their associated labels from the data grid associated with a chart.

Syntax

object.DeleteColumns (column, count)

The DeleteColumns method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
column | Integer. Identifies a specific data column. Columns are numbered from left to right beginning with 1.
count | Integer. Specifies the number of columns you want to delete.


DeleteRowLabels Method

Deletes levels of labels from the data rows in a data grid associated with a chart.

Syntax

object.DeleteRowLabels (labelIndex, count)

The DeleteRowLabels method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
labelIndex | Integer. Identifies the number of the first level of labels you want to delete. Row labels are numbered right to left, beginning with 1.
count | Integer. Specifies the number of label levels you want to delete. Row labels are deleted from the row identified by labelIndex to the left.


DeleteRows Method

Deletes rows of data and their associated labels from the data grid associated with a chart.

Syntax

object.DeleteRows (row, count)

The DeleteRows method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
row | Integer. Identifies a specific data row. Rows are numbered from top to bottom beginning with 1.
count | Integer. Specifies the number of rows you want to delete.


EditCopy Method

Copies a picture of the current chart to the clipboard in Windows metafile format. It also copies the data being used to create the chart to the clipboard.

Syntax

object.EditCopy

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

This method allows you to paste the chart's data or a picture of the chart itself into another application. Since both the data and the picture of the chart are stored on the clipboard, what gets pasted into the new application varies depending on the type of application. For example, if you execute the chart's EditCopy method in your code and then go to an Excel spreadsheet and select Edit Paste, the chart data set is placed in the spreadsheet. To insert the picture of the chart into the spreadsheet, select Edit Paste Special and select the Picture type.


EditPaste Method

Pastes a Windows metafile graphic or tab-delimited text from the clipboard into the current selection on a chart.

Syntax

object.EditPaste

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

The chart can accept several types of information from the clipboard, depending on the currently selected chart element when EditPaste is called. If the entire chart is selected, the chart looks for data on the clipboard and attempts to use this new data to redraw the chart. If an item that can accept a picture, such as a bar or chart backdrop is selected, the chart looks for a metafile on the clipboard. If it finds a metafile, it uses that metafile to fill the selected object.


GetData Method (MSChart)

Returns the value currently stored in a specific data point in the data grid associated with a chart.

Syntax

object.GetData (row, column, dataPoint, nullFlag)

The GetData method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
row | Integer. Identifies the row containing the data point value.
column | Integer. Identifies the column containing the data point value.
dataPoint | Double. The data point value.
nullFlag | Integer. Indicates whether or not the data point value is a null.


GetSelectedPart Method

Identifies the currently selected chart element.

Syntax

object.GetSelectedPart (part, index1, index2, index3, index4)

The GetSelectedPart method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
part | Integer. Specifies the chart element. Valid constants are VtChPartType.
index1 | Integer. If element refers to a series or a data point, this argument specifies which series. Series are numbered in the order their corresponding columns appear in the data grid from left to right, beginning with 1. If element refers to an axis or axis label, this argument identifies the axis type with a VtChAxisId constant.
Index2 | Integer. If element refers to a data point, this argument specifies which data point in the series identified by index1.
index3 | Integer. If element refers to an axis label, this argument refers to the level of the label. Axis label levels are numbered from the axis out, beginning with 1. If element is not an axis label, the argument is unused.
index4 | Integer. This argument is unused at this time.


InitializeLabels Method

Assigns each label in the first level of data grid labels a unique identifier.

Syntax

object.InitializeLabels

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


InsertColumnLabels Method

Inserts levels of labels for the data columns in a data grid associated with a chart.

Syntax

object.InsertColumnLabels (labelIndex, count)

The InsertColumnLabels method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
labelIndex | Integer. Identifies the number of the first level of labels you want to insert. Column label levels are numbered bottom to top, beginning with 1.
count | Integer. Specifies the number of label levels you want to insert. The number of columns being inserted is calculated from the column identified in labelIndex up.


InsertColumns Method

Adds one or more data columns to the data grid associated with a chart.

Syntax

object.InsertColumns (column, count)

The InsertColumns method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
column | Integer. Identifies a specific data column. Columns are numbered from left to right beginning with 1.
count | Integer. Specifies the number of columns you want to insert.


InsertRowLabels Method

Inserts levels of labels from the data rows in a data grid associated with a chart.

Syntax

object.InsertRowLabels (labelIndex, count)

The InsertRowLabels method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
labelIndex | Integer. Identifies the number of the first level of labels you want to insert. Row labels are numbered right to left, beginning with 1.
count | Integer. Specifies the number of label levels you want to insert. Row labels are inserted from the row identified by labelIndex to the left.


InsertRows Method

Adds one or more data rows to the data grid associated with a chart.

Syntax

object.InsertRows (row, count)

The InsertRows method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
row | Integer. Identifies a specific data row. Rows are numbered from top to bottom beginning with 1.
count | Integer. Specifies the number of rows you want to insert. Rows contain null data until you fill them with data.


Layout Method

Lays out a chart, forcing recalculation of automatic values.

Syntax

object.Layout

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

A chart is laid out the first time it is drawn. When any chart settings change, the chart is again laid out at the next draw. There are a number of settings the chart calculates, such as the axis minimum and maximum values, based on the chart type or some other setting. These values are not determined until the chart is laid out. If you attempt to "get" these automatic values before the chart is properly laid out, they will not reflect the new values.


MoveData Method

Moves a range of data within a data grid associated with a chart.

Syntax

object.MoveData (top, left, bottom, right, overOffset, downOffset)

The MoveData method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
top | Integer. Identifies the first row in the range to move.
left | Integer. Identifies the first column in the range to move.
bottom | Integer. Identifies the last row in the range to move.
right | Integer. Identifies the last column in the range to move.
overOffset | Integer. Identifies the horizontal direction data should be moved. A positive value moves data to the right; a negative value moves data to the left.
downOffset | Integer. Identifies the vertical direction data should be moved. A positive value moves data down, a negative value moves data up.


RandomDataFill Method

Fills the data grid associated with a specific chart with randomly generated data.

Syntax

object.RandomDataFill

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


RandomFillColumns Method

Fills a number of data grid columns associated with a chart with random values.

Syntax

object.RandomFillColumns (column, count)

The RandomFillColumns method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
column | Integer. Identifies the first column you wish to fill. Columns are numbered from left to right beginning with 1.
count | Integer. Specifies the number of columns you want to fill with random data.


RandomFillRows Method

Fills a number of data grid rows associated with a chart with random values.

Syntax

object.RandomFillRows (row, count)

The RandomFillRows method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
row | Integer. Identifies the first row you wish to fill. Rows are numbered from top to bottom beginning with 1.
count | Integer. Specifies the number of rows you want to fill with random data.


Remove Method (LightSources Collection)

Removes a LightSource from the LightSources collection.

Syntax

object.Remove (index)

The Remove method syntax has these parts:

Part | Description
collection | A object expression that evaluates to an object in the Applies To list.
index | Integer. A specific light source by position in the list of light sources.


ResetCustomLabel Method

Resets any custom attributes placed on a data point label in a chart to the series default.

Syntax

object.ResetCustomLabel

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


ResetCustom Method

Resets any custom attributes placed on a data point to the series default.

Syntax

object.ResetCustom

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Select Method

Selects the specified chart element.

Syntax

object.Select

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


SelectPart Method

Selects the specified chart part.

Syntax

object.SelectPart (part, index1, index2, index3, index4)

The SelectPart method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
part | Integer. Specifies the chart part. Valid constants are VtChPartType.
index1 | Integer. If part refers to a series or a data point, this argument specifies which series. Series are numbered in the order their corresponding columns appear in the data grid from left to right, beginning with 1. If part refers to an axis or axis label, this argument identifies the axis type with a VtChAxisId constant.
index2 | Integer. If part refers to a data point, this argument specifies which data point in the series is identified by index1. Data points are numbered in the order their corresponding rows appear in the data grid from top to bottom, beginning with 1. If part refers to an axis, axis title, or axis label, this argument refers to the axis index which is currently not used. In this case, the only valid value for this argument is 1.
index3 | Integer. If part refers to an axis label, this argument refers to the level of the label. Axis label levels are numbered from the axis out, beginning with 1. If part is not an axis label, the argument is unused.
index4 | Integer. This argument is unused at this time.


SetData Method (MSChart)

Sets the value for a specific data point in the data grid associated with a chart.

Syntax

object.SetData (row, column, dataPoint, nullFlag)

The SetData method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
row | Integer. Identifies the row containing the data point value.
column | Integer. Identifies the column containing the data point value.
dataPoint | Double. The data point value.
nullFlag | Integer. Indicates whether or not the data point value is a null.


Set Method (LightSource)

Sets the x, y, and z coordinates and the intensity for the LightSource object location.

Syntax

object.Set (x,y,z, intensity)

The Set method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
x, y, z | Integers. Indicate the light source location.
intensity | Single. Indicate the light source intensity.


Set Method (Coor, LCoor)

Sets the x and y coordinate values for a chart.

Syntax

object.Set ( x,y )

The Set method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
x | Single. (Long for LCoor object.) Identifies the x value of the coordinate.
y | Single. (Long for LCoor object.) Identifies the y value of the coordinate.


Set Method (View3D)

Sets the rotation and degree of elevation for a three-dimensional chart.

Syntax

object.Set (rotation, elevation )

The Set method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
rotation Single. The degree of rotation.

Rotation can range from 0 to 360 degrees. By default, degrees are used to measure rotation. However, these settings use the current settings for the AngleUnit property. The other options are: Grads and Radians.
elevation Single. The degree of elevation.

Elevation can be any number from 0 to 90 degrees. If you set the elevation to 90 degrees, you look directly down onto the top of the chart. If you set the elevation to 0, you look directly at the side of the chart. The default elevation is 30 degrees. By default, degrees are used to measure elevation. However, these settings use the current settings for the AngleUnits property. The other options are: Grads and Radians.


Set Method (VtColor)

Sets the red, green and blue values of the VtColor object.

Syntax

object.Set ( red,green,blue)

The Set method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
red, green, blue | Integer. The values for the red, green and blue components of color.

Remarks

RGB specifies the relative intensity of red, green, and blue to cause a specific color to be displayed. The valid range for a normal RGB color is 0 to 16,777,215. The value for any argument to RGB that exceeds 255 is assumed to be 255.


Set Method (Weighting)

Sets the basis and style of the Weighting object.

Syntax

object.Set ( basis, style )

The Set method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
basis | A VtChPieWeightBasis constant that identifies the weighting type.
style | A VtChPieWeightStyle constant that identifies the weighting factor method.


SetSize Method

Resizes the number of data columns and rows, as well as the number of levels of column labels and row labels of a data grid associated with a chart at one time.

Syntax

object.SetSize (rowLabelCount, columnLabelCount, dataRowCount, columnLabelCount)

The SetSize method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
rowLabelCount | Integer. Returns or sets the number of levels of row labels you want on the data grid.
columnLabelCount | Integer. Returns or sets the number of levels of column labels you want on the data grid.
dataRowCount | Integer. Returns or sets the number of data rows you want on the data grid.
columnLabelCount | Integer. Returns or sets the number of data columns you want on the data grid.

Remarks

This method can be used in place of RowCount, ColumnCount, RowLabelCount and ColumnLabelCount.

If you reduce the size of the data grid, data in deleted rows or columns is destroyed.


ToDefaults Method

Returns the chart to its initial settings.

Syntax

object.ToDefaults

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


TwipsToChartPart Method

Identifies a chart part by using the x and y set of coordinates on to identify that part.

Syntax

object.TwipsToChartPart (xVal, yVal, part, index1, index2, index3, index4)

The TwipsToChartPart method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
xVal,yVal | Long. The horizontal and vertical coordinates of the point.
part | Integer. A VtChPartType constant that identifies the chart part that is located at the xVal and yVal coordinates.
index1 | Integer. If part refers to a series or a data point, this argument specifies which series. Series are numbered in the order their corresponding columns appear in the data grid from left to right, beginning with 1. If part refers to an axis or axis label, this argument identifies the axis type using the VtChAxisId constant.
index2 | Integer. If part refers to a data point, this argument specifies which data point in the series identified by index1. Data points are numbered in the order their corresponding rows appear in the data grid from top to bottom, beginning with 1. If part refers to an axis, axis title, or axis label, this argument refers to the axis index which is currently not used. In this case, the only valid value for this argument is 1.
index3 | Integer. If part refers to an axis label, this argument refers to the level of the label. Axis label levels are numbered from the axis out, beginning with 1. If part is not an axis label, the argument is unused.
index4 | Integer. This argument is unused at this time.


TypeByChartType Method

Returns the series type used to draw a series if the chart type is set to chType. This method allows you to get the series type information based on a specified chart type without actually setting the chart type.

Syntax

object.TypeByChartType (chtype)

The TypeByChartType method syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
chtype | Integer. A VtChChartType constant describing the chart type.

Return Values

Depending on the chart type specified by the chtype argument, the TypeByChartType method returns one of the VtChSeriesType values, as shown below:

Constant | Value | Description
VtChSeriesTypeDefault | -1 | Default
VtChSeriesType3dBar | 0 | 3D Bar
VtChSeriesType2dBar | 1 | 2D Bar
VtChSeriesType3dLine | 5 | 3D Line
VtChSeriesType2dLine | 6 | 2D Line
VtChSeriesType3dArea | 7 | 3D Area
VtChSeriesType3dStep | 9 | 3D Step
VtChSeriesType2dStep | 10 | 2D Step
VtChSeriesType2dXY | 11 | XY
VtChSeriesType2dPie | 24 | 2D Pie


AxisGrid Object

Represents the planar area surrounding a chart axis.

Syntax

AxisGrid


AxisGrid Object Example

The following example changes the appearance of the y AxisGrid line style.

Private Sub Command1_Click()
   With MSChart1.Plot.Axis(VtChAxisIdY)
      .CategoryScale.Auto = False
      .ValueScale.MajorDivision = 10
      .ValueScale.MinorDivision = 5
      .AxisGrid.MajorPen.Style = VtPenStyleSolid
      .AxisGrid.MajorPen.VtColor.Green = 255
      .AxisGrid.MajorPen.Width = 2
      .AxisGrid.MinorPen.Style = VtPenStyleDashed
      .AxisGrid.MinorPen.VtColor.Red = 255
      .AxisGrid.MinorPen.Width = 1
      .AxisGrid.MinorPen.Cap = VtPenCapRound
   End With
End Sub


Axis Object

Represents an axis on a chart.

Syntax

Axis

Remarks

Three axes are available: x, y, and z. The z axis is visible only when the chart is a 3D chart.


Axis Object Example

The following example reads the number of label levels present on the x axis using the x Axis object.

Private Sub Command1_Click()
   Dim XAxis As Object
   Dim NumberOfLevels As Integer
   ' Read the number of label level present on the X
   ' Axis.
   Set XAxis = MSChart1.Plot.Axis(VtChAxisIdX, 1)
   NumberOfLevels = XAxis.LabelLevelCount
   MsgBox "Number of Label Levels = " _
   & Str(NumberOfLevels)
End Sub


AxisScale Object

Controls how chart values are plotted on an axis.

Syntax

AxisScale


AxisScale Example

The following examples sets the x and y axes to either a percent scale or a logarithmic for a two-dimensional line chart. To try the example, draw an MSChart and two CommandButton controls on a form. Paste the code into the Form object's code module and run the project.

Private Sub Command1_Click()
   ' Change both x and y axes to Percent scale for 2D
   ' Line chart.
   Dim axisID As VtChAxisId
   MSChart1.ChartType = VtChChartType2dLine
   For AxisId = VtChAxisIdX To VtChAxisIdY
      With MSChart1.Plot.Axis(AxisId).AxisScale
         .Type = VtChScaleTypePercent
         .PercentBasis = VtChPercentAxisBasisSumChart
      End With
   Next
End Sub

Private Sub Command2_Click()
   Dim axisID As VtChAxisId
   ' Change both x and y axes to Logarithmic scale for 2D
   ' Line chart.
   MSChart1.ChartType = VtChChartType2dLine
   For axisID = VtChAxisIdX To VtChAxisIdY
      With MSChart1.Plot.Axis(axisID).AxisScale
         .Type = VtChScaleTypeLogarithmic
         .LogBase = 12
      End With
   Next
End Sub


AxisTitle Object

Represents an axis title on a chart.

Syntax

AxisTitle


AxisTitle Object Example

The following example makes the axis title visible for all axes of a three-dimensional chart.

Private Sub Command1_Click()
   ' Makes Axis title visible for all axes of a
   ' 3D chart.
   Dim axisID As VtChAxisId
   MSChart1.chartType = VtChChartType3dBar
   For axisId = VtChAxisIdX To VtChAxisIdZ
      With MSChart1.Plot.axis(axisId, 1)
         .AxisTitle.VtFont.Size = 14
         .AxisTitle.Visible = True
         Select Case axisId
            Case 0
               .AxisTitle.text = "X Axis Title"
            Case 1
                .AxisTitle.text = "Y Axis Title"
            Case 2
               .AxisTitle.text = "2nd Y Axis Title"
            Case 3
               .AxisTitle.text = "Z Axis Title"
         End Select
      End With
   Next
End Sub


Backdrop Object

Represents a shadow or pattern behind a chart element.

Syntax

Backdrop

Remarks

For the Plot object's Backdrop object, set the Style property to VtFillStyleBrush to see the effects.


Brush Object

The fill type used to display a chart element.

Syntax

Brush


Brush Example

Brush Object Example

The following example sets a bold vertical line pattern for the chart backdrop using the Brush object.

Private Sub Command1_Click()
   ' Sets Backdrop to Fill - Brush Style.
   MSChart1.Backdrop.Fill.Style = VtFillStyleBrush
   ' Sets a pattern for the chart backdrop using the
   ' Brush object.
   With MSChart1.Backdrop.Fill.Brush
      .Style = VtBrushStylePattern
      .Index = VtBrushPatternBoldVertical
   ' Sets Pattern to Bold Vertical lines.
      .FillColor.Set 255, 0, 0   ' Fill Color = Red.
      .PatternColor.Set 0, 0, 255   ' Pattern Color =
                                 ' Blue.
   End With
End Sub


CategoryScale Object

The scale for a category axis.

Syntax

CategoryScale


CategoryScale Object Example

The following example sets the scaling attributes for a category axis.

Private Sub Command1_Click()
   ' Sets scaling attributes for a category axis.
   MSChart1.ChartType = VtChChartType2dLine
   With MSChart1.Plot.Axis(VtChAxisIdX)
      .ValueScale.MajorDivision = 10
      .ValueScale.MinorDivision = 5
      .CategoryScale.Auto = False          ' Sets manual scaling.
      .CategoryScale.DivisionsPerLabel = 2 ' Label appears every two
                                           ' divisions.
      .CategoryScale.DivisionsPerTick = 2  ' Ticks appear every two
                                           ' divisions.
      .CategoryScale.LabelTick = True   ' Labels displayed on top of
                                       ' Tick marks.
   End With
End Sub


Coor Object

Describes a floating x and y coordinate pair for a chart.

Syntax

Coor


DataGrid Object

Represents a virtual matrix containing labels and data points for the MSChart control.

Syntax

DataGrid

Remarks

The DataGrid object is configured as rows and columns. You can add and subtract rows, columns, and labels to this matrix to change the appearance of the chart.


DataGrid Object Example

The following example sets the chart parameters for a three-dimensional bar chart, fills the chart with random data and labels the data grid columns.

Option Explicit
Option Base 1

Private Sub Command1_Click()
   Dim rowLabelCount, columnLabelCount, rowCount As Integer
   Dim columnCount, labelIndex, Column, Row As Integer
   MSChart1.ChartType = VtChChartType3dBar
   With MSChart1.DataGrid
   ' Set Chart parameters using methods.
      rowLabelCount = 2
      columnLabelCount = 2
      rowCount = 6
      columnCount = 6
      .SetSize RowLabelCount, columnLabelCount, _
      RowCount, ColumnCount
      ' Randomly fill in the data.
      .RandomDataFill
      ' Then assign labels to second Level.
      labelIndex = 2
      column = 1
      .ColumnLabel(column, labelIndex) = "Product 1"
      column = 4
      .ColumnLabel(column, labelIndex) = "Product 2"
      row = 1
      .RowLabel(row, labelIndex) = "1994"
      row = 4
      .RowLabel(row, labelIndex) = "1995"
   End With
End Sub


DataPointLabel Object

The label for a data point on a chart.

Syntax

DataPointLabel


DataPoint Object

A member of the DataPoints collection that describes the attributes of an individual data point on a chart.

Syntax

DataPoint

Remarks

The DataPoints collection is accessed through the SeriesCollection object.

Important The DataPoints collection contains only one member at this time. To access it, you must use the –1, as shown below

MSChart1.Plot.SeriesCollection(1).DataPoints(-1) _
.Brush.FillColor.Set 0, 255, 255


DataPoint Object Example

The following example assigns a variable to a data point and sets the data point color and marker.

Private Sub Command1_Click()
   ' Change the color and marker of First DataPoint in
   ' the First Series.
   With MSChart1.Plot.SeriesCollection(1).DataPoints(-1)
      ' Change Data Point color to blue.
      .Brush.Style = VtBrushStyleSolid
      ' Set Color=Blue.
      .Brush.FillColor.Set 0, 255, 255
      ' Set DataPoint marker visible.
      .Marker.Visible = True
   End With
End Sub


Fill Object

Describes the type and appearance of an object's backdrop in a chart.

Syntax

Fill


Fill Object Example

The following example sets a gradient backdrop for a chart using the Fill object.

Private Sub Command1_Click()
   With MSChart1.backdrop.Fill
      ' Set a brush pattern backdrop.
      .Style = VtFillStyleBrush
      .Brush.Style = VtBrushPattern50Percent
   End With
End Sub


VtFontObject Example

The following example sets the font parameters for a chart title.

Private Sub Command1_Click()
   ' Ask user to supply a title.
   MSChart1.Title.Text = InputBox("Title?")
   ' Make Chart Title visible.
   MSChart1.Title.Location.Visible = True
   ' Set font for Chart Title.
   With MSChart1.Title.VtFont
      .Name = "Times New Roman"
      .Size = 18
      .Style = VtFontStyleBold Or _
      VtFontStyleItalic
      ' Use both StrikeThrough and Underline in the
      ' text.
      .Effect = VtFontEffectStrikeThrough Or _
      VtFontEffectUnderline
      ' Set text color to Blue.
      .VtColor.Set 0, 0, 255
   End With
End Sub


Footnote Object

Descriptive text that appears beneath a chart.

Syntax

Footnote


Footnote Object Example

The following example sets the footnote location, text and color for a chart.

Private Sub Command1_Click()

   With MSChart1.Footnote
      ' Make Footnote Visible.
      .Location.Visible = True
      .Location.LocationType = _
      VtChLocationTypeBottomLeft

      ' Set Footnote properties.
      .text = "Chart Footnote"
      .VtFont.VtColor.Set 255, 0, 0
   End With

End Sub


Frame Object

Holds information about the appearance of the frame around a chart element.

Syntax

Frame


Frame Object Example

The following example sets a blue, double-line frame on a chart backdrop.

Private Sub Command1_Click()
   With MSChart1.backdrop.Frame
      .Style = VtFrameStyleDoubleLine
      .Width = 2
      .FrameColor.Set 0, 0, 255   ' Blue frame.
      .SpaceColor.Set 255, 0, 0   ' Red spacing.
   End With
End Sub


Intersection Object

The point at which an axis intersects an intersecting axis on a chart.

Syntax

Intersection


Intersection Object Example

The following example sets manual intersection position properties and displays labels with the axis.

Private Sub Command1_Click()
      With MSChart1.Plot.Axis(VtChAxisIdX).Intersection
      ' Set Intersection Properties.
      .Auto = False   ' Set positioning to manual.
      .Point = 20      ' Set intersection with the Y
                     ' Axis to 20.
      .LabelsInsidePlot = True   ' Display Labels
                                 ' with Axis not at
                                 ' the base.
   End With
End Sub


Label Object

An item within a Labels collection that describes a specific chart axis label.

Syntax

axis.Label


LCoor Object

Describes a long integer x and y coordinate pair.

Syntax

Lcoor


Legend Object

Represents the graphical key and accompanying text that describes a chart series.

Syntax

Legend


Legend Object Example

The following example sets the text and backdrop parameters for a chart legend.

Private Sub Command1_Click()
   With MSChart1.Legend
      ' Make Legend Visible.
      .Location.Visible = True
      .Location.LocationType = VtChLocationTypeRight
      ' Set Legend properties.
      .TextLayout.HorzAlignment = _
      VtHorizontalAlignmentRight   ' Right justify.
      ' Use Yellow text.
      .VtFont.VtColor.Set 255, 255, 0
      .Backdrop.Fill.Style = VtFillStyleBrush
      .Backdrop.Fill.Brush.Style = VtBrushStyleSolid
      .Backdrop.Fill.Brush.FillColor.Set 255, 0, 255
   End With
End Sub


Light Object

Represents the light source illuminating a three-dimensional chart.

Syntax

Light


Light Object Example

The following example sets the ambient light and edge lighting intensity for a chart. To try the example, draw an MSChart and two ComboBox controls on a form. Paste the code into the Form object's code module and run the project. Click the ComboBox controls to see the change of ambient light and edge intensity.

Private Sub Form_Load()
    ' Configure the chart.
   With MSChart1
      .Title = "Hold down Control and mousedown on chart"
      .chartType = VtChChartType3dBar
      .Plot.Light.AmbientIntensity = 1   ' 100 % Intensity.
      .Plot.Light.EdgeIntensity = 0.5        ' 50 % Intensity.
      .Plot.Light.EdgeVisible = True
   End With
   'Configure ComboBoxe controls.
   ConfigCombo Combo1
   ConfigCombo Combo2
End Sub

Private Sub ConfigCombo(cmb As ComboBox)
   ' Populate a combobox with values.
   Dim i As Single
   For i = 0 To 1 Step 0.1
      cmb.AddItem i
   Next i
   cmb.ListIndex = 0
End Sub

Private Sub Combo1_Click()
   MSChart1.Plot.Light.AmbientIntensity = Combo1.Text
End Sub

Private Sub Combo2_Click()
   MSChart1.Plot.Light.EdgeIntensity = Combo2.Text
End Sub


LightSource Object

Represents the light source used to illuminate elements in a three-dimensional chart.

Syntax

LightSource


Location Object

Represents the current position of a textual chart element such as the title, legend, or footnote.

Syntax

Location

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Location Object Example

The following example sets the title location for a chart using the Location object. To try the example, draw an MSChart and a ComboBox control on a form. Paste the code into the Form object's code module, and run the project. Click the ComboBox to change the title location.

Option Explicit

Private Sub Combo1_Click()
   MSChart1.Title.Location.LocationType = Combo1.ListIndex
End Sub

Private Sub Form_Load()
   ' Set Title Text.
   With MSChart1
      .TitleText = "Test Title Location"
      .Title.Location.Visible = True
   End With

   ' Add LocationType constants to ComboBox.
   With Combo1
      .AddItem "VtChLocationTypeTopLeft"     ' 0
      .AddItem "VtChLocationTypeTop"         ' 1
      .AddItem "VtChLocationTypeTopRight"    ' 2
      .AddItem "VtChLocationTypeLeft"        ' 3
      .AddItem "VtChLocationTypeRight"       ' 4
      .AddItem "VtChLocationTypeBottomLeft"  ' 5
      .AddItem "VtChLocationTypeBottom"      ' 6
      .AddItem "VtChLocationTypeBottomRight" ' 7
      .AddItem "VtChLocationTypeCustom"      ' 8
      .ListIndex = 0
   End With
End Sub


Marker Object

A marker that identifies a data point on a chart.

Syntax

Marker


Marker Object Example

The following example sets a blue X marker style for a chart series.

Option Explicit
Option Base 1
Private Sub Command1_Click()
   ' Display Markers for Series 1.
   Dim i As Integer
   For i = 1 To MSChart1.Plot.SeriesCollection.Count
      With MSChart1.Plot.SeriesCollection _
      .Item(i).DataPoints.Item(-1).Marker
         .Visible = True
         .Size = 20
         .Style = VtMarkerStyleX
         .FillColor.Automatic = False
         .FillColor.Set 0, 0, 255
      End With
   Next i
End Sub


Pen Object

Describes the color and pattern of lines or edges on a chart.

Syntax

Pen


Pen Object, GuideLinePen Property Example

The following example sets the pen attributes for a two-dimensional xy chart series. The GuideLinePen property returns a reference to a Pen object.

Private Sub Command1_Click()
   ' Set Guide Lines for 2D XY chart Series 1.
   MSChart1.ChartType = VtChChartType2dXY
   MSChart1.Plot.SeriesCollection.Item(1) _
   .ShowGuideLine(VtChAxisIdX) = True
   With _
   MSChart1.Plot.SeriesCollection.Item(1).GuideLinePen
      ' Set Pen attributes.
      .VtColor.Set 255, 255, 0
      .Width = 10
      .Style = VtPenStyleDashDot
      .Join = VtPenJoinRound
      .Cap = VtPenCapRound
   End With
End Sub


PlotBase Object

The area beneath a chart.

Syntax

PlotBase


PlotBase Object Example

The following example sets the chart base parameters on a three-dimensional bar chart.

Private Sub Command1_Click()
   ' Change the chart type to 3D.
   MSChart1.ChartType = VtChChartType3dBar
   With MSChart1.Plot.PlotBase
      ' Change the base height.
      .BaseHeight = 20
      ' Use the pattern style for base.
      .Brush.Style = VtBrushStylePattern
      .Brush.Index = VtBrushPatternHorizontal
      .Brush.FillColor.Set 255, 160, 160
      .Brush.PatternColor.Set 180, 180, 255
      .Pen.Style = VtPenStyleSolid
      .Pen.VtColor.Set 72, 72, 255
   End With
End Sub


Plot Object

Represents the area upon which a chart is displayed.

Syntax

Plot

Remarks

The Plot object allows you to program the following objects:

  1. Axis object—represents the x, y, and z axis of the chart. The z axis is only visible on 3D charts.

  2. BackDrop object—the area behind the axes.

  3. Light object—the ambient and edge light of the plot.

  4. LocationRect object—the location of the plot.

  5. SeriesCollection object—the collection of series sets.

  6. View3D object—the elevation and rotation of the 3D image.

  7. Wall object—the area behind the plot.


Plot Object Example

The following example sets the chart viewing distance and axis division spacing.

Private Sub Command1_Click()
   ' Change the chart type to 3D Bar.
   MSChart1.ChartType = VtChChartType3dBar
   With MSChart1.Plot
      ' Changes 3d bar chart's viewing.
      .DepthToHeightRatio = 2
      .WidthToHeightRatio = 2
      ' Changes the spacing between divisions on the
      ' X-Axis.
      .xGap = 0
      ' Changes the spacing between divisions on the
      ' Z-Axis.
      .zGap = 0.8
   End With
End Sub


Rect Object

Defines a coordinate location.

Syntax

Rect


LocationRect Property, Rect Object Example

The example increases the size of the chart plot using the LocationRect property and the x and y properties of the Rect object.

Private Sub Command1_Click()
   ' Increase the size of the chart plot.
   MSChart1.Plot.AutoLayout = False
   With MSChart1.Plot.LocationRect
      .Min.x = .Min.x * 1.2
      .Min.y = .Min.y * 1.2
      .Max.x = .Max.x * 1.2
      .Max.y = .Max.y * 1.2
   End With
End Sub


SeriesMarker Object

Describes a marker that identifies all data points within one series on a chart.

Syntax

SeriesMarker


SeriesMarker Object Example

The following example sets marker parameters for all series in a chart.

Private Sub Command1_Click()
   Dim serX As series
   ' Show markers and unshow the lines for all series.
   MSChart1.chartType = VtChChartType2dLine
   For Each serX In MSChart1.Plot.SeriesCollection
      serX.SeriesMarker.Show = True
      serX.ShowLine = False
   Next
End Sub


Series Object

An item from a SeriesCollection collection that represents a group of data points on a chart.

Syntax

Series


Series Object Example

The following example changes the appearance of the lines for all series in a three-dimensional line chart.

Private Sub Command1_Click()
   Dim serX As Series
   ' Change the chart type to 3D line and smoothing
   ' each line.
   MSChart1.chartType = VtChChartType3dLine
   MSChart1.ColumnCount = 4
   For Each serX In MSChart1.Plot.SeriesCollection
      serX.ShowGuideLine(VtChAxisIdY) = True
      serX.GuideLinePen.Style = VtPenStyleDitted
      serX.Pen.Style = 4
   Next
End Sub


SeriesPosition Object

The location where a chart series is drawn in relation to other series. If all series have the same order (position), then they are stacked.

Syntax

SeriesPosition


Shadow Object

Holds information about the appearance of a shadow on a chart element.

Syntax

Shadow


Shadow Object Example

The following example sets a shadow on a chart backdrop title.

Private Sub Command1_Click()
   ' Show shadow for title.
   With MSChart1.Title
      .Location.Visible = True
      .Text = "Chart Title"
      .Backdrop.Frame.Width = 1
      .Backdrop.Frame.FrameColor.Set 255, 0, 0
      .Backdrop.Frame.Style = VtFrameStyleSingleLine
      .Backdrop.Shadow.Style = VtShadowStyleDrop
      .Backdrop.Shadow.Offset.x = 10
      .Backdrop.Shadow.Offset.y = 10
   End With
End Sub


StatLine Object

Describes how statistic lines are displayed on a chart.

Syntax

StatLine


StatLine Object Example

The following example sets the color and pen parameters for a chart statistics line.

Private Sub Command1_Click()
   ' Show all statistic lines for series 2.
   MSChart1.chartType = VtChChartType2dLine
   With MSChart1.plot.SeriesCollection(2).StatLine
      .VtColor.Set 128, 128, 255
      .Flag = VtChStatsMinimum Or VtChStatsMaximum _
      Or VtChStatsMean Or VtChStatsStddev Or _
      VtChStatsRegression
      .Style(vtChStatsMinimum) = VtPenStyleDotted
      .width = 2
   End With
End Sub


TextLayout Object

Represents text positioning and orientation.

Syntax

TextLayout


TextLayout Object Example

The following example sets the title text position and orientation for a chart.

Private Sub Command1_Click()
   ' Sets the title text position and orientation.
   With Form1.MSChart1.Title
      .Location.Visible = True
      .Location.LocationType = VtChLocationTypeLeft
      .Text = "Title TextLayout"
   End With
   With Form1.MSChart1.Title.TextLayout
      .Orientation = VtOrientationUp
      .HorzAlignment = VtHorizontalAlignmentCenter
      .VertAlignment = VtVerticalAlignmentCenter
   End With
End Sub


Tick Object

A marker indicating a division along a chart axis.

Syntax

Tick


Tick Object Example

The following example sets the tick length and style for the y axis on a chart.

Private Sub Command1_Click()
   ' Set the tick for y axis.
   With Form1.MSChart1.Plot.Axis(VtChAxisIdY, 1).Tick
      .Length = 500
      .Style = VtChAxisTickStyleOutside
   End With
End Sub


Title Object

Text identifying the chart.

Syntax

Title


ValueScale Object

Scale used to display a value axis.

Syntax

ValueScale


ValueScale Object Example

The following example sets the major and minor grid line color for a two-dimensional bar chart using the ValueScale object.

Private Sub Command1_Click()
   ' Set chart type to 2d bar.
   MSChart1.ChartType = VtChChartType2dBar
   ' Use manual scale to display y axis (value axis).
   With MSChart1.Plot.Axis(VtChAxisIdY).ValueScale
      .Auto = False
      .MajorDivision = 2
      .MinorDivision = 5
   End With
   ' Show major grid line in red and minor grid line
   ' in blue.
   With MSChart1.Plot.Axis(VtChAxisIdY).AxisGrid
      .MajorPen.VtColor.Set 255, 0, 0
      .MajorPen.Width = 4
      .MinorPen.VtColor.Set 0, 0, 255
      .MinorPen.Width = 2
   End With
End Sub


View3D Object

Represents the physical orientation of a three-dimensional chart.

Syntax

View3D


View3D Object Example

The following example sets the chart elevation and rotation for a three-dimensional bar chart using the view object.

Private Sub Command1_Click()
   ' Set the chart type to 3d bar.
   Form1.MSChart1.ChartType = VtChChartType3dBar
   With Form1.MSChart1.Plot.View3d
      .Elevation = 90   ' Look directly down onto the
                        ' top of the chart.
      .Rotation = 90
   End With
End Sub


MSChart Control Example

The following example displays a three-dimensional chart with eight columns and rows of data and sets the legend parameters.

Private Sub Command1_Click()
   With MSChart1
      ' Displays a 3d chart with 8 columns and 8 rows
      ' data.
      .ChartType = VtChChartType3dBar
      .ColumnCount = 8
      .RowCount = 8
      For column = 1 To 8
         For row = 1 To 8
            .Column = column
            .Row = row
            .Data = row * 10
         Next row
      Next column
      ' Use the chart as the backdrop of the legend.
      .ShowLegend = True
      .SelectPart VtChPartTypePlot, index1, index2, _
      index3, index4
      .EditCopy
      .SelectPart VtChPartTypeLegend, index1, _
      index2, index3, index4
      .EditPaste
   End With
End Sub


VtColor Object

Describes a drawing color in a chart.

Syntax

VtColor


VtColor Object, FillColor Property Example

The following example sets the fill color for a chart backdrop brush. The FillColor property returns a reference to the VtColor object.

Private Sub Command1_Click()
' Sets Backdrop to Fill - Brush Style.
   MSChart1.Backdrop.Fill.Style = VtFillStyleBrush
   ' Sets chart fill color to red.
   With MSChart1.Backdrop.Fill.Brush.FillColor
      .Red = 255   ' Use properties to set color.
      .Green = 0
      .Blue = 0
   End With
End Sub


VtFont Object

The font used to display chart text.

Syntax

VtFont


Wall Object

A planar area depicting the y axes on a three-dimensional chart.

Syntax

Wall


Wall Object Example

The following example displays a colored wall for a three-dimensional chart.

Private Sub Command1_Click()
   ' Displays a colored wall for a 3D chart.
   Form1.MSChart1.ChartType = VtChChartType3dBar
   With Form1.MSChart1.Plot.Wall
      .Brush.Style = VtBrushStylePattern
      .Brush.Index = VtBrushPatternChecks
      .Brush.FillColor.Set 255, 120, 120
      .Brush.PatternColor.Set 120, 120, 0
      .Width = 20
   End With
End Sub


Weighting Object

Represents the size of a pie in relation to other pies in the same chart.

Syntax

Weighting


Weighting Object Example

The following example shows the weighting of a pie chart.

Private Sub Command1_Click()
   ' Show the weighting of the pie.
   Form1.MSChart1.ChartType = VtChChartType2dPie
   With Form1.MSChart1.Plot.Weighting
      .Basis = VtChPieWeightBasisTotal
      .Style = VtChPieWeightStyleArea
   End With
End Sub


ActiveSeriesCount Property

Returns the number of series that appear on a chart based on the number of columns in the DataGrid object and the type of chart being drawn.

Syntax

object.ActiveSeriesCount

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


AllowDithering Property

Returns or sets a value that determines whether to disable color dithering for charts on 8-bit color monitors in order to enable use of MSChart control's own color palette and enhance the chart display.

Syntax

object.AllowDithering [ =boolean]

The AllowDithering property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies whether a color dithering is allowed, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | Color dithering is allowed.
False | (Default) MSChart control's color palette is used for enhanced color matching and display.


AllowDynamicRotation Property

Returns or sets a value that indicates whether users can interactively rotate three-dimensional charts by holding down the control key to display the rotation cursor.

Syntax

object.AllowDynamicRotation [ = boolean]

The AllowDynamicRotation property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies whether a dynamic rotation is allowed, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) The user can interactively rotate the chart with the cursor.
False | The user cannot interactively rotate the chart with the cursor.


AllowSelections Property

Returns or sets a value that indicates whether or not users can select chart objects.

Syntax

object.AllowSelections [ = boolean]

The AllowSelections property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies whether selections can be made, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) The user can interactively select chart objects.
False | The user cannot select chart objects.


AllowSeriesSelection Property

Returns or sets a value that indicates whether a series is selected when a user clicks on an individual chart data point.

Syntax

object.AllowSeriesSelection [ = boolean]

The AllowSeriesSelection property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies whether series are selected, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) Users can select a series by clicking a data point.
False | Clicking a data point selects only that data point, not the entire series.


AmbientIntensity Property

Returns or sets the percentage of ambient light illuminating a three-dimensional chart.

Syntax

object.AmbientIntensity [ = intensity ]

The AmbientIntensity property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
intensity | Single. The chart light intensity. Valid values are 0 to 1. If set to 1, all sides of the chart elements are fully illuminated no matter what light sources are turned on. If set at 0, there is no contribution from ambient light; only the sides of the chart elements facing active light sources are illuminated.


AngleUnit Property

Returns or sets the unit of measure used for all chart angles.

Syntax

object.AngleUnit [ = unit]

The AngleUnit property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
unit | Integer. A VtAngleUnits constant describing the unit of measure. The angles can be measured in degrees, radians, or grads.


AutoIncrement Property

Returns or sets a value that determines if the properties that set the current data point are incremented during data entry without manually setting the Column and Row properties.

Syntax

object.AutoIncrement [ = boolean]

The AutoIncrement property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies whether the current data point is incremented, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | When the Data property is changed, the Row property updates to the next row in the column. If you are at the end of a column, the Column property increments to the next column.
False | (Default) The current data point is not incremented.


AutoLayout Property

Returns or sets a value that determines whether or not a Plot object is in manual or automatic layout mode.

Syntax

object.AutoLayout [ = boolean ]

The AutoLayout property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies the layout mode, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) The Plot object automatically determines the proper size and position of the plot based on the size and position of other elements.
False | The coordinates specified by Plot object's LocationRect property are used to position the plot.


Automatic Property

Returns or sets a value that determines whether the color is calculated automatically. This is only used for edge pens on chart elements.

Syntax

object.Automatic [ = boolean]

The Automatic property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that determines whether the color is calculated automatically, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | Color automatically picks up the brush color used on the chart series.
False | The color is determined based on the settings of Value.


Auto Property (CategoryScale)

Returns or sets a value that indicates whether the axis is automatically scaled.

Syntax

object.Auto [ = boolean]

The Auto property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies whether the item is displayed, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) The axis is automatically scaled based on the data being charted.
False | The axis is not automatically scaled. Values in DivisionsPerLabel and DivisionsPerTick are used to determine the scale.


Auto Property (Intersection)

Returns or sets a value that determines whether or not the Intersection object uses the value of the Point property to position the axis.

Syntax

object.Auto [ = boolean]

The Auto property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies whether the item is displayed, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) The axis is positioned in its standard location.
False | The intersecting axis is positioned at the value indicated by Point.


Auto Property (Label)

Returns or sets a value that determines whether axis labels are automatically rotated to improve the chart layout.

Syntax

object.Auto [ = boolean ]

The Auto property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies how axis labels will be positioned, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) The labels may be rotated.
False | The labels are not rotated. Long labels may not display properly.


Auto Property (SeriesMarker)

Returns or sets a value that determines if the SeriesMarker object assigns the next available marker to all data points in the series.

Syntax

object.Auto [ = boolean]

The Auto property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that controls how markers are assigned, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) The SeriesMarker object assigns the marker.
False | You can assign a custom marker.

Remarks

Set this property to False if you wish to change the series marker type.

This property is automatically set to False if the Marker property of the DataPoint object is set.


Auto Property (ValueScale)

Returns or sets a value that determines whether automatic scaling is used to draw the value axis.

Syntax

object.Auto [ = boolean]

The Auto property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that determines whether automatic scaling is used, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | The scale is automatically set based on the data being charted.
False | The values in the Minimum, Maximum, MajorDivisions and MinorDivisions properties are used to scale the axis.


AxisGrid Property

Returns a reference to an AxisGrid object that represents the planar area surrounding a chart axis.

Syntax

object.AxisGrid

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


AxisId Property

Returns a specific axis that intersects with the current axis.

Syntax

object.AxisId

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Return Value

The return value is an integer that identifies the intersecting axis.


Axis Property

Returns a reference to an Axis object that describes an axis on a chart.

Syntax

object.Axis(axisID)

The Axis property syntax has these parts:

Part | Description
object | Required. An object expression that evaluates to an object in the Applies To list.
axisID | Required. An integer or VtChAxisId constant that identifies a specific axis.
index | Optional. Reserved for future use. Identifies the specific axis when there is more than one axis with the same axisID.

Remarks

Three axes are available: x, y, and z. The z axis is visible only when the chart is a 3D chart.


AxisScale Property

Returns a reference to an AxisScale object that describes how chart values are plotted on an axis.

Syntax

object.AxisScale

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


AxisTitle Property

Returns a reference to an AxisTitle object associated with the axis of a chart.

Syntax

object.AxisTitle

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Backdrop Property

Returns a reference to a Backdrop object that describes the shadow, pattern, or picture behind a chart or chart element.

Syntax

object.Backdrop

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


BarGap Property

Returns or sets the spacing of two-dimensional bars or clustered three-dimensional bars within a category.

Syntax

object.BarGap [ = value]

The BarGap property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
value | Single. The bar spacing value. This is measured as a percentage of the bar width. A value of 0 results in the bars touching. A value of 100 means the gap between the bars is as wide as the bars.


BaseHeight Property

Returns or sets the height of the three-dimensional chart base in points.

Syntax

object.BaseHeight [ = height]

The BaseHeight property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
height | Single. The base height.


Basis Property

Returns or sets the type of weighting used to determine pie size on a chart.

Syntax

object.Basis [ = type ]

The Basis property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | A VtChPieWeightBasis constant that identifies the weighting type.


Blue Property

Returns or sets the blue component of the RGB value in a chart.

Syntax

object.Blue [=b]

The Blue property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
b | Integer. The blue value.

Remarks

RGB specifies the relative intensity of red, green, and blue to cause a specific color to be displayed. The valid range for a normal RGB color is 0 to 16,777,215. The value for any argument to RGB that exceeds 255 is assumed to be 255.


Brush Property

Returns a reference to a Brush object that describes the fill type used to display a chart element.

Syntax

object.Brush

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Cap Property

Returns or sets a value that determines how line ends are capped.

Syntax

object.Cap [ = type ]

The Cap property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | Integer. A VtPenCap constant that describes the line pen cap style.


CategoryScale Property

Returns a reference to a CategoryScale object that describes the scale information for a category axis.

Syntax

object.CategoryScale

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Chart3d Property

Returns a value that specifies whether or not a chart is three dimensional.

Syntax

object.Chart3D

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Return Values

Setting | Description
True | The chart is a three-dimensional chart.
False | The chart is not a three-dimensional chart.

Remarks

Whether or not a chart is three-dimensional depends on the ChartType property's setting.


ChartData Property

Returns or sets an array that contains the values that will be displayed by the chart.

Syntax

object.ChartData [ = data ]

The ChartData property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
data | Variant. A two-dimensional array that holds the data used to draw the chart.

Remarks

If the first series of a multi-dimensional array contains strings, those strings will become the labels of the chart.

ChartData is the default property for the MSChart control.


ChartData Property Example

The following example uses a Visual Basic array to load the chart data grid directly. To try the example, draw a MSChart control on a form, paste the code into the Form object's code module, and run the project.

Option Explicit
Option Base 1

Private Sub Form_Load()
    Dim arrData(3, 1 To 3)
    arrData(1, 1) = "Jan"   ' Set the labels in the first series.
    arrData(2, 1) = "Feb"
    arrData(3, 1) = "Mar"

    arrData(1, 2) = 8
    arrData(2, 2) = 4
    arrData(3, 2) = 0.3

    arrData(1, 3) = 0.2
    arrData(2, 3) = 3
    arrData(3, 3) = 6.3
    MSChart1.ChartData = arrData
End Sub

In this example, the lower subscript bound was declared as 1 using the Option Base 1 statement, rather than the default of 0. We use a Variant array where the first series values are set to string variables and the second and third series' values are set to numeric values. This allows both the chart's labels and data to be set simultaneously. Note that declaring the array as type String works too, as long as the second and third series contain numeric values. If you wish only to set the chart's data, the array can be of the numeric types Integer, Long, Single or Double. Note that doing this will replace the existing chart labels with default row/column labels. Also, a one-dimensional array will work as well as a two-dimensional one as long as the last values are either numeric or text representations of numeric values.

The following example returns data from the chart. The example contains a loop to print out the array returned from the chart. Note the use of the Lbound and Ubound functions to determine the array bounds from the chart. To try the example, draw a CommandButton control onto a form with a MSChart control. Paste the code into the code module, run the project, and click the button.

Option Explicit
Private Sub Command1_Click()
   Dim y() As Variant
   Dim i, j As Integer
   y = MSChart1.ChartData
   For i = LBound(y, 2) To UBound(y, 2)
      Debug.Print
      For j = LBound(y, 1) To UBound(y, 1)
         Debug.Print y(j, i)
      Next j
   Next i
End Sub

The returned array lower bound values are equal to 0. The returned array will always be a two-dimensional array of type Variant. Since ChartData is the default property for the chart, the object name alone, such as MSChart1, can be substituted for MSChart1.ChartData. So you could use MSChart1 = data or data = MSChart1.


ChartType Property

Returns or sets the chart type being used to display a chart.

Syntax

object.ChartType [ = type]

The ChartType property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | Integer. A VtChChartType constant that describes the chart type.


Clockwise Property

Returns or sets a value that specifies whether pie charts are drawn in a clockwise direction.

Syntax

object.Clockwise [ = boolean]

The Clockwise property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that controls the direction used to draw pie charts, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) Pie charts are drawn in a clockwise direction.
False | The charts are drawn in a counterclockwise direction.


ColumnCount Property

Returns or sets the number of columns in the current data grid associated with a chart.

Syntax

object.ColumnCount [ = count]

The ColumnCount property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
count | The number of data columns.


ColumnLabelCount Property

Returns or sets the number of levels of labels on the columns in the data grid associated with a chart.

Syntax

object.ColumnLabelCount [ = count]

The ColumnLabelCount property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
count | Integer. The number of column label levels. Set this property to add or delete levels of labels on data grid columns.

Remarks

Column label levels are numbered from bottom to top, beginning at 1. Levels are added or subtracted from the top.


ColumnLabelIndex Property

Returns or sets a specific level of column labels associated with a chart.

Syntax

object.ColumnLabelIndex [ = index]

The ColumnLabelIndex property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
index | Integer. Identifies a column label level.

Remarks

To set a label on a column with more than one level of labels, or to return the current value for a label, you must first identify which level you want to affect. Column label levels are numbered from bottom to top, beginning at 1.


ColumnLabel Property (MSChart)

Returns or sets the label text associated with a column in the data grid of a chart.

Syntax

object.ColumnLabel [ = text ]

The ColumnLabel property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
text | String. Label text associated with a column in the data grid.

Remarks

This property sets the label for the column currently identified by the Column property.


ColumnLabel Property (DataGrid Object)

Returns or sets the label on a data column in the grid associated with a chart.

Syntax

object.ColumnLabel( column, labelIndex ) [= text ]

The ColumnLabel property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
column | Integer. Identifies a specific data column. Columns are numbered from left to right beginning with 1. Any columns containing labels are not counted as data columns.
labelIndex | Integer. Identifies a specific label. If more than one level of column labels exist for the column, you must identify one of them. Column labels are numbered from bottom to top beginning at 1.
text | String. The column label text.


ColumnLabel Property Example

The example adds three column labels to the z axis of a chart. To try the example, draw an MSChart control on a form. Paste the code into the Form object's code module, and run the project. Click the form to see the labels.

Option Explicit
Option Base 1

Private Sub Form_Click()
   With MSChart1
      .chartType = VtChChartType3dLine

      .Plot.Axis(VtChAxisIdZ).Labels(1).VtFont.Size = 24
      .DataGrid.ColumnLabel(1, 1) = "Label Z1"
      .DataGrid.ColumnLabel(2, 1) = "Label Z2"
      .DataGrid.ColumnLabel(3, 1) = "Label Z3"
   End With
End Sub

Private Sub Form_Load()
   ' The first series contains labels for the X axis.
   Dim arrData(4, 1 To 4)
   arrData(1, 1) = "Jan"
   arrData(2, 1) = "Feb"
   arrData(3, 1) = "Mar"
   arrData(4, 1) = "Apr"

   arrData(1, 2) = 8
   arrData(2, 2) = 4
   arrData(3, 2) = 0.3
   arrData(4, 2) = 3

   arrData(1, 3) = 0.2
   arrData(2, 3) = 3
   arrData(3, 3) = 6.3
   arrData(4, 3) = 2

   arrData(1, 4) = 5
   arrData(2, 4) = 7
   arrData(3, 4) = 2
   arrData(4, 4) = 9
   MSChart1.ChartData = arrData
End Sub


Column Property (MSChart Control)

Returns or sets the current data column in the data grid.

Syntax

object.Column [ = col ]

The Column property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
col | Integer. The current data column.

Remarks

You must select a column before you can use other properties to change the column's corresponding chart series or any data point within the series.


Component Property

Returns or sets the type of label to be used to identify the data point.

Syntax

object.Component [ = type]

The Component property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | Integer. A VtChLabelComponent constant that identifies the label type.


CompositeColumnLabel Property

Returns the multilevel label string that identifies a column in the data grid associated with a chart.

Syntax

object.CompositeColumnLabel(column)

The CompositeColumnLabel property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
column | Integer. Identifies a specific data column. Columns are numbered from left to right beginning with 1. Any columns containing labels are not counted as data columns.


CompositeRowLabel Property

Returns the multilevel label string that identifies a row in the data grid associated with a chart.

Syntax

object.CompositeRowLabel (row)

The CompositeRowLabel property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
row | Integer. Identifies a specific data row. Rows are numbered from top to bottom beginning with 1. Any rows containing labels are not counted as data rows.


Custom Property

Returns or sets a value that determines if custom text is used to label a data point on a chart.

Syntax

object.Custom [ = boolean]

The Custom property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies whether custom text is used, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | The label contains custom text.
False | (Default) Information specified by the DataPointLabel object's Components property is used to label the data point.


DataGrid Property

Returns a reference to a DataGrid object that describes the data grid associated with a chart.

Syntax

object.DataGrid

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


DataPointLabel Property

Returns a reference to a DataPointLabel object that describes a label on an individual chart data point.

Syntax

object.DataPointLabel

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


DataPoints Property

Returns a reference to a DataPoint Collection that describes the data points within a chart series.

Syntax

object.DataPoints

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Data Property (MSChart)

Returns or sets a value that is inserted into the current data point in the data grid of a chart.

Syntax

object.Data [ = value]

The Data property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
value | Integer. The data point value.

Remarks

If the current data point already contains a value, it is replaced by the new value. The chart is redrawn to reflect the new value for the current data point.


DataSeriesInRow Property

Returns or sets a value that indicates whether series data is being read from a row or a column in a data grid associated with a chart.

Syntax

object.DataSeriesInRow [ = boolean]

The DataSeriesInRow property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that controls how series data is read, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | Series data is being read from a row in a data grid.
False | (Default) Series data is being read from a column.


DefaultPercentBasis Property

Returns the default axis percentage basis for the chart.

Syntax

object.DefaultPercentBasis

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Return Value

An integer that specifies the default axis percentage basis. Possible return values are VtChPercentAxisBasis constants.


DepthToHeightRatio Property

Returns or sets the percentage of the chart height to be used as the chart depth.

Syntax

object.DepthToHeightRatio [ = pctg]

The DepthToHeightRatio property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
pctg | Single. The chart height percentage.

Remarks

This property has an effect only on 3 dimensional chart types.


DivisionsPerLabel Property

Returns or sets the number of divisions to skip between labels.

Syntax

object.DivisionsPerLabel [ = num]

The DivisionsPerLabel property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
num | Integer. An integer representing the number of divisions.

Remarks

If this property is set, the object's Auto property is automatically set to False.


DivisionsPerTick Property

Returns or sets the number of divisions to skip between major tick marks.

Syntax

object.DivisionsPerTick [ = num ]

The DivisionsPerTick property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
num | Integer. An integer representing the number of divisions.

Remarks

If this property is set, the object's Auto property is automatically set to False.


DoSetCursor Property

Returns or sets a value that indicates whether or not the cursor can be set by a chart. The DoSetCursor property determines whether or not the application can control what the mouse pointer looks like.

Syntax

object.DoSetCursor [ = boolean]

The DoSetCursor property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies whether custom text is used, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) The application can control the mouse pointer appearance.
False | The application cannot control the mouse pointer appearance.


DrawMode Property (MSChart)

Returns or sets a value that determines when and how a chart is repainted.

Syntax

object.DrawMode [ = mode]

The DrawMode property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
mode | Integer. A value that determines how and when the chart will be redrawn, as shown in Settings.

Settings

The settings for mode are:

Constant | Value | Description
VtChDrawModeDraw | 0 | Draws directly to the display device.
VtChDrawModeBlit | 1 | Blits an offscreen drawing to the display device.


EdgeIntensity Property

Returns or sets the intensity of light used to draw the edges of objects in a three-dimensional chart.

Syntax

object.EdgeIntensity [ = edgeint ]

The EdgeIntensity property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
edgeint | Single. The edge light intensity. Valid values are 0 to 1.0. An intensity of 0 turns edges off, drawing the edges as black lines; and an intensity of 1 fully illuminates the edges using the element's pen color.

Remarks

If this property is set, then the Light object's EdgeVisible property is automatically set to True.


EdgePen Property

Returns the Pen object used to draw the edge of the data point on a chart.

Syntax

object.EdgePen

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


EdgeVisible Property

Returns or sets a value that determines whether edges are displayed on the elements in a three-dimensional chart.

Syntax

object.EdgeVisible [ = boolean ]

The EdgeVisible property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies edges are displayed, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | Edges are visible.
False | Edges are not displayed on elements in the three-dimensional chart.


Effect Property

Returns or sets the font effects in a chart.

Syntax

object.Effect [ = effects ]

The Effect property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
effects | Integer. A VtFontEffect constant describing the font effect.


Elevation Property

Returns or sets a value that describes the degree of elevation from which a three-dimensional chart is viewed.

Syntax

object.Elevation [ = degree]

The Elevation property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
degree Single. The degree of elevation.

Elevation can be any number from 0 to 90 degrees. If you set the elevation to 90 degrees, you look directly down onto the top of the chart. If you set the elevation to 0, you look directly at the side of the chart. The default elevation is 30 degrees. By default, degrees are used to measure elevation. However, these settings use the current settings for the AngleUnit property. The other options are: Grads and Radians.


Excluded Property

Returns or sets a value that determines whether a series is included on the chart.

Syntax

object.Excluded [ = boolean]

The Excluded property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that controls whether a series is included on the chart, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | The chart is drawn without including the series.
False | (Default) The series is included when the chart is drawn. A series may be included in a chart, but still not display because it is Hidden.


FillColor Property

Returns a reference to a VtColor object that describes the color used to fill a chart element.

Syntax

object.FillColor

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

If the FillColor property of the Marker object is set, then the Marker object's Visible property is automatically set to True.


Fill Property

Returns a reference to a Fill object that describes the type and appearance of a chart object's backdrop.

Syntax

object.Fill

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Flag Property

Returns or sets which statistic lines are being displayed for a series.

Syntax

object.Flag [ = lines]

The Flag property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
lines | Integer. A VtChStats constant used to describe the stat line. If more than one statistics line is displayed, the constants are combined with an OR operator.


Font Property (MSChart)

Returns a reference to a standard Font object that describes the font used to display text on the chart.

Syntax

object.Font

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Footnote Property

Returns a reference to a Footnote object that provides information about the descriptive text used to annotate a chart.

Syntax

object.Footnote

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


FootnoteText Property

Returns or sets the text used as the footnote.

Syntax

object.FootnoteText [ = text]

The FootnoteText property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
text | String. The footnote text.

Remarks

The same results can be achieved by using the Text property of the Footnote object.


FormatLength Property

Returns the length of the format string.

Syntax

object.FormatLength

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Return Value

Integer


Format Property (Label Object)

Returns or sets the characters that define the format used to display the axis label.

Syntax

object.Format [ = format]

The Format property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
format | String. Defines the format used to display the axis label.


FrameColor Property

Returns a reference to a VtColor object that specifies the color used to frame a chart element.

Syntax

object.FrameColor

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Frame Property

Returns a reference to a Frame object that describes the appearance of the frame around a chart element.

Syntax

object.Frame

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Green Property

Returns or sets the green component of the RGB value in a chart.

Syntax

object.Green [=g]

The Green property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
g | Integer. The green value.

Remarks

RGB specifies the relative intensity of red, green, and blue to cause a specific color to be displayed. The valid range for a normal RGB color is 0 to 16,777,215. The value for any argument to RGB that exceeds 255 is assumed to be 255.


GuidelinePen Property

Returns a reference to a Pen object that describes the pattern of line and color used to display guidelines.

Syntax

object.GuidelinePen

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

Setting this property automatically sets the ShowGuideLines property to True.


Hidden Property (MSChart)

Returns or sets a value that determines whether a series is displayed on the chart.

Syntax

object.Hidden [ = boolean]

The Hidden property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that controls whether a series is displayed on the chart, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | The chart is drawn without displaying the series. However, any space allocated for the series still exists.
False | (Default) The series is displayed.


Hide Property

Returns or sets a value that determines whether the axis on a chart is hidden.

Syntax

object.Hide [ = boolean]

The Hide property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies whether the axis is hidden, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | The axis scale, line, ticks and title are hidden.
False | (Default) The axis appears on the chart.


HorzAlignment Property

Returns or sets the method of horizontal alignment of text.

Syntax

object.HorzAlignment [ = type]

The HorzAlignment property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | Integer. A VtHorizontalAlignment constant used to describe the horizontal alignment method of text.


Index Property (Brush)

Returns or sets the pattern or hatch used in the brush if its Style property is set to VtBrushStylePattern or VtBrushStyleHatch.

Syntax

object.Index [= num]

The Index property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
num | A VtBrushPattern constant or VtBrushHatch constant describing the brush pattern.


Index Property (Intersection)

Returns which axis intersects another axis when there is more than one axis with the same index.

Syntax

object.Index

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Return Value

The return value is an integer that specifies the index of the intersecting axis. Currently, 1 is the only valid value for this argument.


Intensity Property

Returns or sets the strength of the light coming from the light source.

Syntax

object.Intensity [ = strength]

The Intensity property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
strength | Single. The light strength. If the intensity is set to 100 percent (1), chart surfaces facing the light source are fully illuminated. If the light is set at 50 percent (.5), these surfaces receive 50 percent illumination from this light. Valid range is 0 to 1.

Remarks

Intensity is the default property of the LightSource object.


Intersection Property

Returns a reference to an Intersection object that describes the point at which an axis intersects another axis on a chart.

Syntax

object.Intersection

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Item Property (MSChart)

Returns a reference to an object within a collection that describes a chart element.

Syntax

object.Item (index)

The Item property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
index | An unique integer that identifies the member of the collection.


Join Property

Returns or sets a value that determines how line segments are formed.

Syntax

object.Join [ = type ]

The Join property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | Integer. A VtPenJoin constant that describes the style of pen join.


LabelLevelCount Property

Returns the number of levels of labels for a given axis. Not available at design time.

Syntax

object.LabelLevelCount [= count]

The LabelLevelCount property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
count | Integer. An integer that describes the number of labels.


LabelsInsidePlot Property

Returns or sets a value that determines whether to leave the axis labels at the normal location or move them with the axis to the new intersection point.

Syntax

object.LabelsInsidePlot [= boolean]

The LabelsInsidePlot property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies where to display the axis labels, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) The axis labels remain at the normal location.
False | The labels move inside the plot to the new intersection point.

Remarks

If this property is set, then the Intersection object's Auto property is automatically set to False.


Labels Property

Returns a reference to a Labels collection that describes the labels on a chart axis.

Syntax

object.Labels

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


LabelTick Property

Returns or sets a value that indicates whether category axis labels are centered on an axis tick mark.

Syntax

object.LabelTick [ = boolean]

The LabelTick property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies whether the item is displayed, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | The labels are centered on a tick mark.
False | (Default) The labels are centered between two tick marks.

Remarks

If this property is set, the object's Auto property is automatically set to False.


Legend Property

Returns a reference to a Legend object that contains information about the appearance and behavior of the graphical key and accompanying text that describes the chart series.

Syntax

object.Legend

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


LegendText Property

Returns or sets the text that identifies the series in the legend of a chart.

Syntax

object.LegendText [ = text ]

The LegendText property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
text | String. The text that identifies the current series in the legend.

Remarks

By default, this text is the same as the Text property of the ColumnLabel object.


Length Property (MSChart)

Returns or sets the length of axis tick marks, measured in points.

Syntax

object.Length [ = length]

The Length property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
length | Integer. The axis tick mark length.


Light Property

Returns a reference to a Light object that provides information about the light illuminating a three-dimensional chart.

Syntax

object.Light

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


LightSources Property

Returns a reference to a LightSources collection that describes all light sources used to illuminate a three-dimensional chart.

Syntax

object.LightSources

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Limit Property

Returns or sets the joint limit, in points, of the line.

Syntax

object.Limit [ = joint ]

The Limit property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
joint | Single. A joint limit as a multiple of the line width. If two lines meet at a sharp angle, a mitered join results in a corner point that extends beyond the actual corner. If the distance from the inner join point to the outer join point exceeds the value in this variable, the join automatically changes to a bevel.


LineStyle Property (DataPointLabel Object)

Returns or sets the type of line used to connect a data point to a label on a chart.

Syntax

object.LineStyle [ = type]

The LineStyle property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | Integer. A VtChLabelLineStyle constant identifying the connecting line.


Location Property

Returns a reference to a Location object that describes the position of textual chart elements.

Syntax

object.Location

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


LocationRect Property

Returns a reference to a Rect object that specifies the location of the chart plot using x and y coordinates.

Syntax

object.LocationRect

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

The values of this property are used to position the plot if AutoLayout is False.

If this property is set, then the AutoLayout property is automatically set to False.


LocationType Property

Returns or sets the standard position used to display a chart element.

Syntax

object.LocationType [=type]

The LocationType property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type Integer. For the DataPointLabel object, A VtChLabelLocationType constant identifying label position.

For a Location object, A VtChLocationType constant describing the location of text.


LogBase Property

Returns or sets the logarithm base used to plot chart values on a logarithmic axis.

Syntax

object.LogBase [ = base]

The LogBase property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
base | Integer. An integer that identifies the logarithm base. The default base is 10. The valid range is 2 to 100.

Remarks

This property has an effect only when the Type property is set to VtChScaleTypeLogarithmic.


MajorDivision Property

Returns or sets the number of major divisions displayed on the axis.

Syntax

object.MajorDivision [ = num]

The MajorDivision property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
num | Integer. Number of divisions.

Remarks

If this property is set, then the ValueScale object's Auto property is automatically set to False.


MajorPen Property

Returns a reference to a Pen object that describes the appearance of the major axis grid lines.

Syntax

object.MajorPen

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Marker Property

Returns a reference to a Marker object that describes the icon used to identify a data point on a chart.

Syntax

object.Marker

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Maximum Property

Returns or sets the highest or ending value on the chart value axis.

Syntax

object.Maximum [ = value]

The Maximum property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
value | Double. The highest axis value.

Remarks

If this property is set, then the ValueScale object's Auto property is automatically set to False.

The Maximum property should be set before the Minimum property to avoid a chart display error.


Max Property (MSChart)

Returns a reference to a Coor object that specifies the ending corner of a rectangle.

Syntax

object.Max

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Minimum Property

Returns or sets the lowest or beginning value on the chart value axis.

Syntax

object.Minimum [ = value]

The Minimum property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
value | Double. The lowest axis value.

Remarks

If this property is set, then the ValueScale object's Auto property is automatically set to False.

The Maximum property should be set before the Minimum property to avoid a chart display error.


MinorDivision Property

Returns or sets the number of minor divisions displayed on the axis.

Syntax

object.MinorDivision [ = num]

The MinorDivision property syntax has these parts:

Part | Description
Object | An object expression that evaluates to an object in the Applies To list.
num | Integer. Number of minor divisions.

Remarks

If this property is set, then the ValueScale object's Auto property is automatically set to False.


MinorPen Property

Returns a reference to a Pen object that describes the appearance of the minor axis grid lines.

Syntax

object.MinorPen

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Min Property (MSChart)

Returns a reference to a Coor object that specifies the starting corner of a rectangle.

Syntax

object.Min

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


MousePointer Property (MSChart)

Returns or sets a value indicating the type of mouse pointer displayed when the mouse is over a particular part of an object at run time.

Syntax

object.MousePointer [ = value ]

The MousePointer property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
value | Integer. A VtMousePointer constant that specifies the type of mouse pointer displayed.


Name Property (VtFont)

Returns or sets the name of the font. This is the default property of the VtFont object.

Syntax

object.Name [ = text ]

The Name property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
text | Integer. The text containing the font name.


Offset Property

Returns or sets the distance that a chart element is offset or pulled away from its default location.

Syntax

object.Offset [ = offset ]

The Offset property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
offset For the DataPoint object, this is an integer describing the offset distance. Offset is measured in inches or centimeters depending upon your default Windows settings.

For the DataPointLabel and Shadow objects, this is a reference to a Coor object that describe the x and y values of the offset.

Remarks

For the DataPointLabel object, this property indicates the distance that a data point label is offset or pulled away from one of the predefined (standard) label positions. The offset is added to the position calculated for the point based on the DataPointLabel object's LocationType setting.


Order Property

Returns or sets the position of the series in the chart. If the position in order matches another series, the series are stacked.

Syntax

object.Order [ = order]

The Order property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
order | Integer. The position order.


Orientation Property (MSChart)

Returns or sets the method of orientation for text.

Syntax

object.Orientation [ = type]

The Orientation property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | Integer. A VtOrientation constant used to describe the orientation method.


PatternColor Property

Returns a reference to a VtColor object that describes the pattern color used to fill a chart element.

Syntax

object.PatternColor

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Pen Property

Returns or sets a reference to a Pen object that describes the color and pattern of lines or edges on chart elements.

Syntax

object.Pen

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


PercentBasis Property

Returns or sets the type of percentage used to plot chart values on a percent axis.

Syntax

object.PercentBasis [ = type ]

The PercentBasis property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | A VtChPercentAxisBasis constant used to describe the percentage used to plot percent axis values.

Remarks

This property has an effect only when the Type property is set to VtChScaleTypePercent.


PercentFormat Property

Returns or sets a string that describes the format used to display the label as a percent.

Syntax

object.PercentFormat [ = format]

The PercentFormat property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
format | String. Describes the format used to display a label as a percent.

Remarks

Use the DataPointLabel object's Component property to change the label type.

The following table lists several examples of percentage format strings. The values listed at left are the valid formats.

 | 3 | -3 | .3
0% | 300% | -300% | 30%
0.0% | 300.0% | -300.0% | 30.0%
0.00% | 300.00% | -300.00% | 30.00%


PlotBase Property

Returns a reference to a PlotBase object that describes the appearance of the area beneath a chart.

Syntax

object.PlotBase

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Plot Property

Returns a reference to a Plot object that describes the area upon which a chart is displayed.

Syntax

object.Plot

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Point Property

Returns or sets the point where the current axis intersects with another axis.

Syntax

object.Point [ = point]

The Point property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
point | Double. The point on an axis where the current axis intersects.

Remarks

If this property is set, then the Intersection object's Auto property is automatically set to False.


Position Property (MSChart)

Returns a reference to a SeriesPosition object that describes the location of one series in relation to other chart series.

Syntax

object.Position

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Projection Property

Returns or sets the type of projection used to display the chart.

Syntax

object.Projection [ = type]

The Projection property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | Integer. A VtProjectionType constant used to describe the type of chart projection.

Remarks

The Projection property determines the appearance of 3 dimensional charts.


Projection Property Example

The example allows you to see the different effects obtainable by setting the Projection property. To try the example, draw an MSChart and a ComboBox control on a form. Paste the code into the Declarations section, and press F5. Click the ComboBox to see the different settings.

Option Explicit

Private Sub Combo1_Click()
   ' Change the projection when clicked.
   MSChart1.Plot.Projection = Combo1.ListIndex
End Sub

Private Sub Form_Load()
   ' Set the chart to a 3D type.
   MSChart1.chartType = VtChChartType3dBar
   ' Configure the ComboBox by adding the valid settings.
   With Combo1
      .AddItem "VtProjectionTypePerspective" ' 0
      .AddItem "VtProjectionTypeOblique"      ' 1
      .AddItem "VtProjectionTypeOrthogonal"  ' 2
      .AddItem "VtProjectionTypeFrontal"      ' 3
      .AddItem "VtProjectionTypeOverhead"    ' 4
      .ListIndex = 0
   End With
End Sub


RandomFill Property

Indicates whether the data for a chart data grid was randomly generated.

Syntax

object.RandomFill [ = boolean]

The RandomFill property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that controls how data is generated, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) Random data is used to draw the chart.
False | No random data is generated. The user provides the data for the chart.


Rect Property

Returns a reference to a Rect object that defines a coordinate location.

Syntax

object.Rect

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Red Property

Returns or sets the red component of the RGB value in a chart.

Syntax

object.Red [=r]

The Red property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
r | Integer. The red value.

Remarks

RGB specifies the relative intensity of red, green, and blue to cause a specific color to be displayed. The valid range for a normal RGB color is 0 to 16,777,215. The value for any argument to RGB that exceeds 255 is assumed to be 255.


Repaint Property

Returns or sets a value that determines if the MSChart control is repainted after a change is made to the chart.

Syntax

object.Repaint [ = boolean]

The Repaint property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that controls whether the chart is repainted, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) Refreshes the control.
False | Does not allow the control to repaint when a change is made to the chart. This is useful when several operations are performed on the chart and you do not want the chart to continually repaint during the process.


Rotation Property

Returns or sets a value that describes the degree of rotation from which a three-dimensional chart is viewed.

Syntax

object.Rotation [ = degree]

The Rotation property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
degree Single. The degree of rotation.

Rotation can range from 0 to 360 degrees. By default, degrees are used to measure rotation. However, these settings use the current settings for the AngleUnit property. The other options are: Grads and Radians.


RowCount Property (MSChart)

Returns or sets how many rows there are in each column of a data grid associated with a chart.

Syntax

object.RowCount [ = count]

The RowCount property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
count | Integer. The number of rows in a column.

Remarks

The virtual data grid is represented by the DataGrid object.


RowLabelCount Property

Returns or sets the number of levels of labels on the rows in a data grid associated with a chart.

Syntax

object.RowLabelCount [ = count ]

The RowLabelCount property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
count | Integer. The number of label levels. Set this property to add or delete levels of labels from data grid rows. Row label levels are numbered from right to left, beginning at 1. Levels are added or subtracted from the left.


RowLabelIndex Property

Returns or sets a value that specifies a level of row labels.

Syntax

object.RowLabelIndex [ = index]

The RowLabelIndex property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
index | Integer. A row label level. To set a label on a row with more than one level of labels, or to return the current value for a label, you must first identify which level you want to affect. Row label levels are numbered from right to left, beginning at 1.


RowLabel Property (MSChart)

Returns or sets a data label that can be used to identify the current data point in a chart.

Syntax

object.RowLabel [ = text]

The RowLabel property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
text | String. The text for a row label. The label you specify sets the label for the data points identified by the Row property. This label appears along the category axis for most chart types and is used as the label for each individual pie in a pie chart. Label text may not be displayed if it is too long to fit on a chart.


RowLabel Property (DataGrid)

Returns or sets a specific row label in the current data grid associated with a chart.

Syntax

object.RowLabel (row, labelIndex ) [ = text ]

The RowLabel property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
row | Integer. Specifies a row. Rows are numbered from top to bottom beginning at 1.
labelIndex | Integer. Specifies a specific level of row labels. Row labels are numbered from left to right beginning at 1.
text | String. Text of the row label.


Row Property (MSChart)

Returns or sets a specific row in the current column of a data grid associated with a chart.

Syntax

object.Row [ = num]

The Row property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
num | Integer. A row number in the current column. Rows are numbered from top to bottom beginning with 1.


SecondaryAxis Property

Returns or sets a value that determines whether the series is charted on the secondary axis.

Syntax

object.SecondaryAxis [ = boolean]

The SecondaryAxis property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that controls whether the series is charted on the secondary axis, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | The series is charted on the secondary axis.
False | (Default) The series is not charted on the secondary axis.


SeriesCollection Property

Returns a reference to a SeriesCollection collection that provides information about the series that make up a chart.

Syntax

object.SeriesCollection

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


SeriesColumn Property

Returns or sets the column position for the current series data.

Syntax

object.SeriesColumn [ = pos]

The SeriesColumn property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
pos | Integer. The position of the column containing the current series data. You can use this property to reorder series. If two series are assigned the same position, they are stacked.


SeriesMarker Property

Returns a reference to a SeriesMarker object that describes a marker that identifies all data points within one series on a chart.

Syntax

object.SeriesMarker

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


SeriesType Property

Returns or sets the type used to display the current series.

Syntax

object.SeriesType [ = type]

The SeriesType property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | Integer. A VtChSeriesType constant describing the method used to display the series. You must select the series to change using the Column property before using the SeriesType property.


Shadow Property

Returns a reference to a Shadow object that describes the appearance of a shadow on chart elements.

Syntax

object.Shadow

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


ShowGuideLine Property

Returns or sets a value that determines whether or not the connecting data point lines on a chart are displayed for a series.

Syntax

object.ShowGuideLines (axisId, index) [ = boolean ]

The ShowGuideLine property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
axisId | Integer. A VtChAxisId constant describing the series axis you want to set this property for.
index | Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
boolean | A Boolean expression that controls whether the series is charted on the secondary axis, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | The series guidelines are displayed.
False | (Default) The series guidelines are not displayed.


ShowLegend Property

Returns or sets a value that indicates whether a legend is visible for a chart.

Syntax

object.ShowLegend [ = boolean]

The ShowLegend property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that controls whether a legend is displayed on the chart, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | The legend appears on the chart in the position indicated by the Location object.
False | (Default) The legend is not displayed on the chart. The default legend location is to the right side of the chart.

Remarks

The default legend location is to the right side of the chart.


ShowLine Property

Returns or sets a value that determines whether the lines connecting data points on a chart are visible.

Syntax

object.ShowLine [ = boolean]

The ShowLine property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that controls whether lines are displayed, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) The lines connecting data points appear on the chart.
False | The data point lines do not appear.


Show Property

Returns or sets a value that determines whether series markers are displayed on a chart.

Syntax

object.Show [ = boolean]

The Show property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that controls whether series markers are displayed, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | Series markers are displayed
False | (Default) Series markers are not displayed.


Size Property (MSChart)

Returns or sets the size of a chart element in points.

Syntax

object.Size [ = size]

The Size property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
size | Single. Size of the chart element in points.


Sort Property (MSChart)

Returns or sets the type of sort order used in a pie chart.

Syntax

object.Sort [ = type]

The Sort property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | Integer. A VtSortType constant used to describe the plot sort order.


SpaceColor Property

Returns a reference to a VtColor object that specifies the color used fill the space between double frames around a chart element.

Syntax

object.SpaceColor

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Stacking Property

Sets a value that determines whether all the series in the chart are stacked.

Syntax

object.Stacking [ = boolean]

The Stacking property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that controls whether all chart series are stacked, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | All chart series are stacked.
False | (Default) Chart series are not stacked.


StackOrder Property

Returns or sets in what position the current series is drawn if it is stacked with other series.

Syntax

object.StackOrder [ = position]

The StackOrder property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
position | Integer. The order of the series if stacked with other series. Lower stack orders are on the bottom of the stack.


Standing Property

Returns or sets a value that specifies whether axis labels are displayed horizontally in the x or z plane or vertically on the text baseline in the y plane.

Syntax

object.Standing [ = boolean ]

The Standing property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies how to display the axis labels, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | The axis labels are displayed vertically on the text baseline in the y plane.
False | (Default) The axis labels are displayed horizontally in the x or z plane.


StartingAngle Property

Returns or sets the position where you want to start drawing pie charts.

Syntax

object.StartingAngle [ = angle]

The StartingAngle property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
angle | Single. This angle can be measured in degrees, radians, or grads, depending on the current AngleUnits setting. A value of 0 degrees indicates the 3 o'clock position. Setting the starting angle to 90 degrees moves the starting position to 12 o'clock if the Clockwise property is set to counterclockwise, or to 6 o'clock if it's set to clockwise. Valid values range from -360 to 360 degrees.


StatLine Property

Returns a reference to a StatLine object that describes how statistic lines are displayed on a chart.

Syntax

object.StatLine

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Style Property (MSChart)

Returns or sets the style used to draw certain chart elements

Syntax

object.Style [=style]

The Style property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
style For the Brush object, a VtBrushStyle constant describing the brush pattern.

For the Fill object, a VtFillStyle constant that describes the style of fill. A fill can have a brush, which is a solid color or patterned fill.

For the Frame object, a VtFrameStyle constant that describes the type of frame.

For the Marker object, a VtMarkerStyle constant that lists the marker type.

For the Pen object, a VtPenStyle constant that describes the style of pen.

For the Shadow object, a VtShadowStyle constant used to describe the shadow type.

For the Tick object, a VtChAxisTickStyle constant used to describe the axis tick position.

For the VtFont object, a VtFontStyle constant describing the style of font.

For the Weighting object, a VtChPieWeightStyle constant that identifies the weighting factor method.


Style Property (StatLine)

Returns or sets the line type used to display the statistic line.

Syntax

object.Style (type )[ = style]

The Style property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | Integer. A VtChStats constant used to describe the line type.
style | Integer. A VtPenStyle constant used to describe the stat line style.


SubPlotLabelPosition Property

Returns or sets the position used to display a label on each pie in a chart.

Syntax

object.SubPlotLabelPosition [ = pos]

The SubPlotLabelPosition property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
pos | Integer. A VtChSubPlotLabelLocationType constant used to describe the position of the chart label.


TextLayout Property

Returns a reference to a TextLayout object that describes text positioning and orientation.

Syntax

object.TextLayout

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


TextLength Property

Returns or sets the number of characters in the text of a chart axis title, data point label, footnote, or chart title.

Syntax

object.TextLength [ = size]

The TextLength property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
size | Integer. The number of characters in the text.


TextLengthType Property

Returns or sets a value that specifies how text is drawn to optimize the appearance either on the screen or printed page.

Syntax

object.TextLengthType [ = type]

The TextLengthType property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | Integer. A VtTextLengthType constant indicating the method used to draw text.


Text Property (MSChart)

Returns or sets the text used to display a chart element such as an axis title, data point label, footnote, or chart title.

Syntax

object.Text [ = text ]

The Text property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
text | String. A string that contains the text used for the chart element.

Remarks

The Text property is the default property for each of the objects to which it applies.


Tick Property

Returns a reference to a Tick object that describes a marker indicating a division along a chart axis.

Syntax

object.Tick

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Title Property (MSChart)

Reference to a Title object that describes the text used to title a chart.

Syntax

object.Title

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


TitleText Property

Returns or sets the text displayed as the chart title.

Syntax

object.TitleText [ = text]

The TitleText property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
text | The text used to display a chart title.

Remarks

This property provides a simple means to set or return the chart title. This property is functionally identical to using MSChart.Title.Text.


Type Property (MSChart)

Returns or sets the scale type of an axis.

Syntax

object.Type [ = type]

The Type property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | A VtChScaleType constant describing the axis scale type.


UniformAxis Property

Returns or sets a value that specifies whether the unit scale for all value axes in a chart is uniform.

Syntax

object.UniformAxis [ = boolean]

The UniformAxis property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that controls the unit scale, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | (Default) The unit scale for all value axes is uniform.
False | The unit scale is not uniform. The unit scale is determined by the plot size and positioning set according to the AutoLayout or LocationRect property. If AutoLayout is True, the plot size and position are based on the size and position of other automatically laid out elements. If False, the coordinates specified by LocationRect are used to position the plot and determine the axes unit scale.


ValueFormat Property

Returns or sets the format used to display the label as a value.

Syntax

object.ValueFormat [ = format]

The ValueFormat property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
format | String. Describes the format used to display a label as a value.

Remarks

Use the DataPointLabel object's Component property to change the label type.


ValueScale Property

Returns a reference to a ValueScale object that describes the scale used to display a value axis.

Syntax

object.ValueScale

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


VertAlignment Property

Returns or sets the method used to vertically align text.

Syntax

object.VertAlignment [ = type]

The VertAlignment property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
type | Integer. A VtVerticalAlignment constant used to describe the vertical alignment method of text.


View3D Property

Returns a reference to a View3D object that describes the physical orientation of a three-dimensional chart.

Syntax

object.View3D

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Visible Property (MSChart)

Returns or sets a value that determines whether a chart element is displayed.

Syntax

object.Visible [ = boolean]

The Visible property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that specifies whether the item is displayed, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | The chart, axis title, label, or marker are displayed.
False | The elements are hidden.


VtColor Property

Returns a reference to a VtColor object that describes a drawing color in a chart.

Syntax

object.VtColor

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


VtFont Property

Returns a reference to a VtFont object that describes the font used to display chart text.

Syntax

object.VtFont

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Wall Property

Returns a reference to a Wall object that describes the planar area depicting the y axes on a three-dimensional chart.

Syntax

object.Wall

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Weighting Property

Returns a reference to a Weighting object that describes the size of a pie in relation to other pies in the same chart.

Syntax

object.Weighting

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Width Property (MSChart)

Returns or sets the width of a chart element, in points.

Syntax

object.Width [ = width]

The Width property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
width | Single. The width of the chart element.


WidthToHeightRatio Property

Returns or sets the percentage of the chart height to be used as the chart width.

Syntax

object.WidthToHeightRatio [ = pctg]

The WidthToHeightRatio property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
pctg | Single. The chart height percentage.


WordWrap Property( MSChart)

Returns or sets a value that determines whether text wraps.

Syntax

object.WordWrap [ = boolean ]

The WordWrap property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
boolean | A Boolean expression that determines whether text wraps, as described in Settings.

Settings

The settings for boolean are:

Setting | Description
True | Text wraps.
False | (Default) Text does not wrap.


XGap Property

Returns or sets the spacing of bars between divisions on the x axis. This space is measured as a percentage of the bar width.

Syntax

object.xGap [ = spacing]

The xGap property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
spacing | Single. The bar width percentage. A value of 0 results in the series of bars touching.


X Property

Returns or sets the x value in a floating coordinate pair for a chart.

Syntax

object.X [ = x ]

The X property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
x | Single. (Long for LCoor object.) Identifies the x value of the coordinate.


Y Property

Returns or sets the y value in a floating coordinate pair for a chart.

Syntax

object.Y [ = y ]

The Y property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
y | Single. (Long for LCoor object.) Identifies the y value of the coordinate.


ZGap Property

Returns or sets the spacing of three-dimensional bars between divisions on the z axis. This space is measured as a percentage of the bar depth.

Syntax

object.zGap [ = spacing]

The zGap property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
spacing | Single. The bar depth percentage. A value of 0 results in the series of bars touching along the z axis.


Z Property

Returns or sets the z value in a coordinate location.

Syntax

object.Z [ = z ]

The Z property syntax has these parts:

Part | Description
object | An object expression that evaluates to an object in the Applies To list.
z | Single. (Long for Lcoor object.) Identifies the z value of the coordinate.